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

*** Variables ***
${path}           /api/explore/create

*** Test Cases ***
正例-正常创建探索会话
    [Tags]    F
    create session    URI    ${URL}
    ${content}    POST请求结果_params    ${path}    {"workerId":"a68ad587830d41aebf418a919006353e"}    200    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    200
    Should Be Equal As Strings    ${content["message"]}    成功

反例-传入无效的token
    [Tags]    E
    create session    URI    ${URL}
    ${content}    POST请求结果_params    ${path}    {"workerId":"a68ad587830d41aebf418a919006353e"}    401    {}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    401
    Should Be Equal As Strings    ${content["message"]}    无效的access token

反例-不传入workerId
    [Tags]    E
    create session    URI    ${URL}
    ${content}    POST请求结果_params    ${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

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