*** Settings ***
Library           RequestsLibrary
Resource          flow_zmx.resource
Resource          res_zmx.resource

*** Variables ***
${path}           /api/v1/mcp/delete

*** Test Cases ***
删除MCP服务成功
    create session    URI    ${URL}
    ${full_path}    set variable    ${path}/${mcp_id}
    ${content}    POST请求结果    ${full_path}    {}    200    ${zh_token}
    Should Be Equal As Strings    ${content["code"]}    200
    Should Be Equal    ${content["data"]}    ${None}

不传入token
    create session    URI    ${URL}
    ${full_path}    set variable    ${path}/${mcp_id}
    ${content}    POST请求结果    ${full_path}    {}    401    ${EMPTY}
    Should Be Equal As Strings    ${content["code"]}    401

传入空白token
    create session    URI    ${URL}
    ${full_path}    set variable    ${path}/${mcp_id}
    ${content}    POST请求结果    ${full_path}    {}    401    ${EMPTY}
    Should Be Equal As Strings    ${content["code"]}    401

传入不存在的MCP服务ID
    create session    URI    ${URL}
    ${full_path}    set variable    ${path}/9999
    ${content}    POST请求结果    ${full_path}    {}    200    ${zh_token}
    Should Be Equal As Strings    ${content["code"]}    200

传入非法格式的MCP服务ID
    create session    URI    ${URL}
    ${full_path}    set variable    ${path}/abc
    ${content}    POST请求结果    ${full_path}    {}    422    ${zh_token}
    Should Contain    ${content}    detail
