*** Settings ***
Resource          flow_zmx.resource
Resource          res_zmx.resource

*** Variables ***
${path}           /api/chat/close

*** Test Cases ***
反例-传入错误的token
    [Tags]    E
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {"sessionId":"${sessionId}"}    401    testtoken
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    401
    Should Be Equal As Strings    ${content["message"]}    无效的access token

反例-传入空白token
    [Tags]    E
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {"sessionId":"${sessionId}"}    401    ${EMPTY}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    401
    Should Be Equal As Strings    ${content["message"]}    没有找到认证信息

反例-不传sessionId参数
    [Tags]    E
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {}    200    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    500
    Should Be Equal As Strings    ${content["message"]}    Server busy, please try later

正例-正常结束会话
    [Tags]    F
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {"sessionId":"${sessionId}"}    200    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    200
    Should Be Equal As Strings    ${content["message"]}    成功
