UEidentityAPI.robot 1.31 KB
Newer Older
Yann Garcia's avatar
Yann Garcia committed
1
2
*** Settings ***
Resource    ../environment/variables.txt
3
4
Resource    ../environment/pics.txt
Resource    GenericKeywords.robot
Yann Garcia's avatar
Yann Garcia committed
5
6
7
Library    REST    ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT}    ssl_verify=false
Library    JSONSchemaLibrary    schemas/

8

Yann Garcia's avatar
Yann Garcia committed
9
10
11
*** Keywords ***
Check User Identity Tag state
    [Arguments]    ${ue_identity_tag}    ${state}
12
13
    Should Be True    ${PIC_MEC_PLAT} == '1'
    Should Be True    ${PIC_SERVICES} == '1'
Yann Garcia's avatar
Yann Garcia committed
14
15
16
    Log    Check ueIdentityTag state ${state}
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Content-Type":"application/json"}
17
    Set Headers    {"Authorization":"${TOKEN}"}
Yann Garcia's avatar
Yann Garcia committed
18
19
20
21
22
23
24
25
26
27
28
    Set Headers    {"Content-Length":"0"}
    Get    /exampleAPI/ui/v1/${APP_INSTANCE_ID}/ue_identity_tag_info?ueIdentityTag=${ue_identity_tag}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is   ueIdentityTagInfo
    #Log    Check ueIdentityTagsList for ${UE_IDENTITY_TAG} element
    ${result}=    Should Be Present In Json List    ${response['body']['ueIdentityTagInfo']['ueIdentityTags']}    ueIdentityTag    ${UE_IDENTITY_TAG}
    #Log    ${UE_IDENTITY_TAG} found with state ${result}
    Should Be Equal    ${result}[state]    ${state}
    [return]    ${state}