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

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

*** Test Cases ***
正例-正常中断消息
    [Tags]    F
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {"sessionId":"${sessionId}","streamId":"${ex_streamId}"}    200    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    200

反例-传入错误的token
    [Tags]    E
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {"sessionId":"${sessionId}","streamId":"${ex_streamId}"}    401    testtoken
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    401

反例-传入空白token
    [Tags]    E
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {"sessionId":"${sessionId}","streamId":"${ex_streamId}"}    401    ${EMPTY}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    401

反例-不传sessionId参数
    [Tags]    E
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {"streamId":"${ex_streamId}"}    422    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["detail"][0]["msg"]}    Field required

反例-不传streamId参数
    [Tags]    E
    create session    URI    ${URL}
    ${content}    GET请求结果    ${path}    {"sessionId":"${sessionId}"}    422    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["detail"][0]["msg"]}    Field required
