PlatUeInformationSubscription.robot 3.52 KB
Newer Older
1
2
3
4
5
6
*** Settings ***

Documentation
...    A test suite for validating UE Information Subscription (UEINFOSUB) operations.

Resource    ../../GenericKeywords.robot
Elian Kraja's avatar
Elian Kraja committed
7
8
9
Resource    environment/variables.txt
Library     REST    ${SCHEMA}://${HOST}:${PORT}    ssl_verify=false
Library     OperatingSystem  
10

Elian Kraja's avatar
Elian Kraja committed
11
Default Tags    TC_MEC_SRV_UEINFOSUB
12
13
14
15


*** Test Cases ***

Elian Kraja's avatar
Elian Kraja committed
16
TC_MEC_SRV_UEINFOSUB_001_OK
17
18
19
20
21
22
23
24
    [Documentation]
    ...    Check that the IUT acknowledges the UE information change subscription request
    ...    when commanded by a MEC Application and notifies it when the location changes
    ...
    ...    Reference    ETSI GS MEC 013 V2.1.1, clause 7.3.5
    ...    OpenAPI    https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/zonalTrafficSubscription

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
Elian Kraja's avatar
Elian Kraja committed
25
    Create new subscription    ZonalTrafficSubscription
26
    Check HTTP Response Status Code Is    201
Elian Kraja's avatar
Elian Kraja committed
27
    Check HTTP Response Body Json Schema Is    ZonalTrafficSubscription
Elian Kraja's avatar
Elian Kraja committed
28
    Should Be Equal As Strings    ${response['body']['zonalTrafficSubscription']['zoneId']}        ${ZONAL_TRAF_ZONE_ID}
Elian Kraja's avatar
Elian Kraja committed
29
30
    Should Be Equal As Strings    ${response['body']['zonalTrafficSubscription']['clientCorrelator']}    ${ZONAL_TRAF_SUB_CLIENT_ID}
    Should Be Equal As Strings    ${response['body']['zonalTrafficSubscription']['callbackReference']}        ${ZONAL_TRAF_NOTIF_CALLBACK_URI}
31

Elian Kraja's avatar
Elian Kraja committed
32
33

TC_MEC_SRV_UEINFOSUB_001_BR
34
35
36
37
38
39
40
41
    [Documentation]
    ...    Check that the IUT responds with an error when
    ...    a request with incorrect parameters is sent by a MEC Application
    ...
    ...    Reference    ETSI GS MEC 013 V2.1.1, clause 7.3.5
    ...    OpenAPI    https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/zonalTrafficSubscription

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
Elian Kraja's avatar
Elian Kraja committed
42
    Create new subscription    ZonalTrafficSubscriptionError
43
44
45
    Check HTTP Response Status Code Is    400


Elian Kraja's avatar
Elian Kraja committed
46
TC_MEC_SRV_UEINFOSUB_002_OK
47
48
49
50
51
52
53
    [Documentation]
    ...    Check that the IUT acknowledges the cancellation of UE information change notifications
    ...    when commanded by a MEC Application
    ...
    ...    Reference    ETSI GS MEC 013 V2.1.1, clause 7.3.6

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
Elian Kraja's avatar
Elian Kraja committed
54
    Remove subscription    ${SUBSCRIPTION_ID}
55
56
57
    Check HTTP Response Status Code Is    204


Elian Kraja's avatar
Elian Kraja committed
58
TC_MEC_SRV_UEINFOSUB_002_NF
59
60
61
62
63
64
65
    [Documentation]
    ...    Check that the IUT responds with an error when
    ...    a request for an unknown URI is sent by a MEC Application
    ...
    ...    Reference    ETSI GS MEC 013 V2.1.1, clause 7.3.6

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
Elian Kraja's avatar
Elian Kraja committed
66
    Remove subscription    ${NON_EXISTENT_SUBSCRIPTION_ID}
67
    Check HTTP Response Status Code Is    404
Elian Kraja's avatar
Elian Kraja committed
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
    

*** Keywords ***
Create new subscription
    [Arguments]    ${content}
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Content-Type":"application/json"}
    Set Headers    {"Authorization":"${TOKEN}"}
    ${file}=    Catenate    SEPARATOR=    jsons/    ${content}    .json
    ${body}=    Get File    ${file}
    Post    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/zonalTraffic    ${body}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}
    
Remove subscription  
    [Arguments]    ${subscriptionId}
    Set Headers    {"Accept":"application/json"}
    Set Headers    {"Authorization":"${TOKEN}"}
    Delete    ${apiRoot}/${apiName}/${apiVersion}/subscriptions/zonalTraffic/${subscriptionId}
    ${output}=    Output    response
    Set Suite Variable    ${response}    ${output}

Elian Kraja's avatar
Elian Kraja committed
90