Commit e4b9a76c authored by Elian Kraja's avatar Elian Kraja
Browse files

Fixing issues #20 and #21

parent 2e22c48e
Loading
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -23,12 +23,21 @@ Check HTTP Response Body Json Schema Is

Should Be Present In Json List
    [Arguments]     ${expr}   ${json_field}   ${json_value}
    Log    Check if ${json_field} is present in ${expr} with the value ${jsonvalue}
    Log    Check if ${json_field} is present in ${expr} with the value ${json_value}
    :FOR  ${item}  IN  @{expr}
    \  Exit For Loop If    "${item['${json_field}']}" == "${json_value}"
    Log    Item found ${item}
    [return]    ${item}
    
Should Be Present In Json
    [Arguments]     ${expr}   ${json_field}   ${json_value}
    Log    Check if ${json_field} is present in ${expr} with the value ${json_value}
    Should Be Equal As Strings    ${expr}['${json_field}']    ${json_value}

Check Response Contains
    [Arguments]    ${source}    ${parameter}    ${value}
    Should Be Present In Json    ${source}    ${parameter}    ${value}
    
Check Result Contains
    [Arguments]    ${source}    ${parameter}    ${value}
    Should Be Present In Json List    ${source}    ${parameter}    ${value}
+4 −4
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ TC_MEC_SRV_APPSAQ_002_OK
    ...    Check that the IUT notifies the authorised relevant (subscribed) application
    ...    instances when a new service for a given application instance is registered
    ...
    ...    Reference    ETSI GS MEC 011 V2.0.9, clause 8.2.6.3.4
    ...    Reference    ETSI GS MEC 011 V2.1.1, clause 8.2.6.3.4
    ...    OpenAPI    https://forge.etsi.org/rep/mec/gs011-app-enablement-api/blob/master/MecServiceMgmtApi.yaml#/definitions/ServiceInfo

    [Tags]    PIC_MEC_PLAT    PIC_SERVICES
@@ -55,7 +55,7 @@ TC_MEC_SRV_APPSAQ_002_OK
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    ServiceInfo
    Check HTTP Response Header Contains    Location
    Check Result Contains    ${response['body']}    serName    ${NEW_SERVICE_NAME}
    Check Response Contains    ${response['body']}    serName    ${NEW_SERVICE_NAME}


TC_MEC_SRV_APPSAQ_002_BR
@@ -96,7 +96,7 @@ TC_MEC_SRV_APPSAQ_003_OK
    Get individual service    ${APP_INSTANCE_ID}    ${SERVICE_ID}
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    ServiceInfo
    Check Result Contains    ${response['body']}    serInstanceId    ${SERVICE_ID}
    Check Response Contains    ${response['body']}    serInstanceId    ${SERVICE_ID}


TC_MEC_SRV_APPSAQ_003_NF
@@ -123,7 +123,7 @@ TC_MEC_SRV_APPSAQ_004_OK
    Update service    ${APP_INSTANCE_ID}    ${SERVICE_ID}    ServiceInfoUpdated
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    ServiceInfo
    Check Result Contains    ${response['body']}    version    ${SVC_NEW_VERSION}
    Check Response Contains    ${response['body']}    version    ${SVC_NEW_VERSION}


TC_MEC_SRV_APPSAQ_004_BR
+3 −3
Original line number Diff line number Diff line
@@ -52,8 +52,8 @@ TC_MEC_SRV_APPSUB_002_OK
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    AppTerminationNotificationSubscription
    Check HTTP Response Header Contains    Location
    Check Result Contains    ${response['body']}    subscriptionType    "AppTerminationNotificationSubscription"
    Check Result Contains    ${response['body']}    callbackReference    ${APP_TERM_NOTIF_CALLBACK_URI}
    Check Response Contains    ${response['body']}    subscriptionType    AppTerminationNotificationSubscription
    Check Response Contains    ${response['body']}    callbackReference    ${APP_TERM_NOTIF_CALLBACK_URI}


TC_MEC_SRV_APPSUB_003_OK
@@ -68,7 +68,7 @@ TC_MEC_SRV_APPSUB_003_OK
    Get individual subscription    ${APP_INSTANCE_ID}    ${SUBSCRIPTION_ID}
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    AppTerminationNotificationSubscription
    Check Result Contains    ${response['body']}    subscriptionType    "AppTerminationNotificationSubscription"
    Check Response Contains    ${response['body']}    subscriptionType    AppTerminationNotificationSubscription


TC_MEC_SRV_APPSUB_003_NF
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ TC_MEC_SRV_SAQ_002_OK
    Get specific MEC service    ${SERVICE_ID}
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    ServiceInfo
    Check Result Contains    ${response['body']}    serInstanceId    ${SERVICE_ID}
    Check Response Contains    ${response['body']}    serInstanceId    ${SERVICE_ID}


TC_MEC_SRV_SAQ_002_NF
+3 −3
Original line number Diff line number Diff line
@@ -52,8 +52,8 @@ TC_MEC_SRV_SRVSUB_002_OK
    Check HTTP Response Status Code Is    201
    Check HTTP Response Body Json Schema Is    SerAvailabilityNotificationSubscription
    Check HTTP Response Header Contains    Location
    Check Result Contains    ${response['body']}    subscriptionType    "SerAvailabilityNotificationSubscription"
    Check Result Contains    ${response['body']}    callbackReference    ${APP_SRVSUB_NOTIF_CALLBACK_URI}
    Check Response Contains    ${response['body']}    subscriptionType    "SerAvailabilityNotificationSubscription"
    Check Response Contains    ${response['body']}    callbackReference    ${APP_SRVSUB_NOTIF_CALLBACK_URI}


TC_MEC_SRV_SRVSUB_002_BR
@@ -81,7 +81,7 @@ TC_MEC_SRV_SRVSUB_003_OK
    Get individual subscription    ${APP_INSTANCE_ID}    ${SUBSCRIPTION_ID}
    Check HTTP Response Status Code Is    200
    Check HTTP Response Body Json Schema Is    SerAvailabilityNotificationSubscription
    Check Result Contains    ${response['body']}    subscriptionType    "SerAvailabilityNotificationSubscription"
    Check Response Contains    ${response['body']}    subscriptionType    SerAvailabilityNotificationSubscription


TC_MEC_SRV_SRVSUB_003_NF
Loading