diff --git a/MEC010p2/MEO/GRANT/Grant.robot b/MEC010p2/MEO/GRANT/Grant.robot index 15f350f64e7e6bf462a6278fd5887cdc8c85ca08..3c9fc0e3eec23888bb8b437b3f266b0a538b28a0 100644 --- a/MEC010p2/MEO/GRANT/Grant.robot +++ b/MEC010p2/MEO/GRANT/Grant.robot @@ -8,14 +8,18 @@ Library REST ${MEO_SCHEMA}://${MEO_HOST}:${MEO_PORT} ssl_verify=false Library OperatingSystem +Test Setup Test Setup ${GRANT_ID_PLACEHOLDER} grantRequest ${NO_ACTION} +Test Teardown Test TearDown ${GRANT_ID_PLACEHOLDER} grantRequest ${NO_ACTION} + + *** Test Cases *** TC_MEC_MEC010p2_MEO_GRANT_001_OK [Documentation] TP_MEC_MEC010p2_MEO_GRANT_001_OK ... Check that MEO sends a synchronous grant response when a grant request is requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 (GrantRequest) - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 Note 2 (GrantRequest) - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1 (Grant) + ... ETSI GS MEC 010-2 3.1.1, clause 7.5.1.3.1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.4.2.2-1 (GrantRequest) + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.4.2.2-1 Note 2 (GrantRequest) + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.4.4.2-1 (Grant) [Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS Create a GRANT request grantRequest Check HTTP Response Status Code Is 201 @@ -25,8 +29,8 @@ TC_MEC_MEC010p2_MEO_GRANT_001_OK TC_MEC_MEC010p2_MEO_GRANT_001_BR [Documentation] TP_MEC_MEC010p2_MEO_GRANT_001_BR ... Check that MEO responds with an error when it receives a malformed request when a new grant request is performed - ... ETSI GS MEC 010-2 2.2.1, clause 7.6.1.3.2 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1 (Grant) + ... ETSI GS MEC 010-2 3.1.1, clause 7.6.1.3.2 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.4.4.2-1 (Grant) [Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS Create a GRANT request grantBadRequest Check HTTP Response Status Code Is 400 @@ -34,9 +38,9 @@ TC_MEC_MEC010p2_MEO_GRANT_001_BR TC_MEC_MEC010p2_MEO_GRANT_002_OK [Documentation] TP_MEC_MEC010p2_MEO_GRANT_002_OK ... Check that MEO sends a synchronous grant response when a grant request is requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 //GrantRequest - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1 + ... ETSI GS MEC 010-2 3.1.1, clause 7.5.1.3.1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.4.2.2-1 //GrantRequest + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.4.4.2-1 [Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS Create a GRANT request grantRequest2 Check HTTP Response Status Code Is 201 @@ -44,68 +48,106 @@ TC_MEC_MEC010p2_MEO_GRANT_002_OK Check HTTP Response Body Json Schema Is Grant - TC_MEC_MEC010p2_MEO_GRANT_003_OK [Documentation] TP_MEC_MEC010p2_MEO_GRANT_003_OK ... Check that MEO sends an asynchronous grant response when a grant request is requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 (GrantRequest) - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 Note 2 (GrantRequest) - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1 (Grant) + ... ETSI GS MEC 010-2 3.1.1, clause 7.5.1.3.1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.4.2.2-1 (GrantRequest) + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.4.2.2-1 Note 2 (GrantRequest) + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.4.4.2-1 (Grant) [Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + ${GRANT_ID_VALUE} Get value entry from JSON file grantRequestAsynchronous id Create a GRANT request grantRequestAsynchronous Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location - TC_MEC_MEC010p2_MEO_GRANT_004_OK [Documentation] TP_MEC_MEC010p2_MEO_GRANT_004_OK ... Check that MEO sends an asynchronous grant response when a grant request is requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.5.1.3.1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.2.2-1 (GrantRequest) - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1 (Grant) + ... ETSI GS MEC 010-2 3.1.1, clause 7.5.1.3.1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.4.2.2-1 (GrantRequest) + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.4.4.2-1 (Grant) [Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + ${GRANT_ID_VALUE} Get value entry from JSON file grantRequestAsynchronous2 id Create a GRANT request grantRequestAsynchronous2 Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location - + TC_MEC_MEC010p2_MEO_GRANT_005_OK [Documentation] TP_MEC_MEC010p2_MEO_GRANT_005_OK ... Check that MEO sends the status of a grant request when a query on a granting ID is performed. ... The process of creating the grant is ongoing, no grant is available yet - ... ETSI GS MEC 010-2 2.2.1, clause 7.5.2.3.2 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1 + ... ETSI GS MEC 010-2 3.1.1, clause 7.5.2.3.2 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.4.4.2-1 [Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS - Get an individual grant ${GRANT_ID_ACCEPTED} + [Setup] Test Setup ${None} grantRequestAsynchronous ${REGISTER_ACTION} + ${GRANT_ID_VALUE} Get value entry from JSON file grantRequestAsynchronous id + Get an individual grant ${GRANT_ID_VALUE} Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location + Check HTTP Response Body Json Schema Is Grant + + TC_MEC_MEC010p2_MEO_GRANT_006_OK [Documentation] TP_MEC_MEC010p2_MEO_GRANT_006_OK ... Check that MEO sends the status of a grant request when a query on a granting ID is performed. ... The process of creating the grant is ongoing, no grant is available yet - ... ETSI GS MEC 010-2 2.2.1, clause 7.5.2.3.2 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.4.4.2-1 + ... ETSI GS MEC 010-2 3.1.1, clause 7.5.2.3.2 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.4.4.2-1 [Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS - Get an individual grant ${GRANT_ID} + [Setup] Test Setup ${None} grantRequest ${REGISTER_ACTION} + Get an individual grant ${setup_response['body']['id']} Check HTTP Response Status Code Is 200 Check HTTP Response Header Contains Location Check HTTP Response Body Json Schema Is Grant + + TC_MEC_MEC010p2_MEO_GRANT_006_NF [Documentation] TP_MEC_MEC010p2_MEO_GRANT_006_NF ... Check that MEO responds with an error when it receives ... a request for returning a grant referred with a wrong ID ... ETSI GS MEC 010-2 2.1.1, clause 7.5.2.3.2 [Tags] PIC_GRANTS_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + ##No test setup can be applied because delete operation on grant is not supported (yet). Get an individual grant ${NOT_EXISTING_GRANT_ID} Check HTTP Response Status Code Is 404 *** Keywords *** + +Test Setup + [Arguments] ${grantId} ${content} ${action} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + + IF '''${action}''' == '''${REGISTER_ACTION}''' + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} allow_redirects=false + ${output}= Output response + Set Suite Variable ${setup_response} ${output} + END + +Test Teardown + [Arguments] ${grantId} ${content} ${action} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + + IF '''${action}''' == '''${REGISTER_ACTION}''' + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} allow_redirects=false + END + + + Create a GRANT request [Arguments] ${content} Set Headers {"Accept":"application/json"} diff --git a/MEC010p2/MEO/GRANT/environment/variables.txt b/MEC010p2/MEO/GRANT/environment/variables.txt index 603052eed8800f22bef121a344833af0ff018205..e8ef3c681c82cdcedcbbe1d6a6b1462fae73dee7 100644 --- a/MEC010p2/MEO/GRANT/environment/variables.txt +++ b/MEC010p2/MEO/GRANT/environment/variables.txt @@ -10,8 +10,15 @@ ${apiRoot} ${apiName} granting ${apiVersion} v1 + +${REGISTER_ACTION} REGISTER +${REMOVE_ACTION} REMOVE +${NO_ACTION} NO_ACTION + + # Specific variables ${GRANT_ID} e0deee2b-6e50-4f33-ab09-8bf0585025d3 +${GRANT_ID_PLACEHOLDER} grantIdPlaceHolder ${GRANT_ID_ACCEPTED} abcdee2b-6e50-4f33-ab09-8bf05850abcd ${NOT_EXISTING_GRANT_ID} NOT_EXISTING_GRANT_ID ${APP_INSTANCE_ID} 456 diff --git a/MEC010p2/MEO/GRANT/jsons/grantRequest.json b/MEC010p2/MEO/GRANT/jsons/grantRequest.json index 7c6b0e9f419a7d1fa783577143d8d8ec22552533..111af7a45d6ea764e52a56f7820ce876405b3896 100644 --- a/MEC010p2/MEO/GRANT/jsons/grantRequest.json +++ b/MEC010p2/MEO/GRANT/jsons/grantRequest.json @@ -1,6 +1,5 @@ { - "id": "123", - "appInstanceId": "456", + "appInstanceId": "123", "appLcmOpOccId": "789", "appDId":"appDId", "operation":"INSTANTIATE", diff --git a/MEC010p2/MEO/GRANT/jsons/grantRequest2.json b/MEC010p2/MEO/GRANT/jsons/grantRequest2.json index 4a9a1d48bc09742bdf760c7288e8d4a3541302cb..a70af24286889029277bdcfe45fa908868d0a94d 100644 --- a/MEC010p2/MEO/GRANT/jsons/grantRequest2.json +++ b/MEC010p2/MEO/GRANT/jsons/grantRequest2.json @@ -1,8 +1,8 @@ { - "id": "123", - "appInstanceId": "456", + "appInstanceId": "123", "appLcmOpOccId": "789", "operation": "OPERATE", + "appDId":"appDId", "addResources": [ { "resourceDefinitionId": "resourceDefinitionId", diff --git a/MEC010p2/MEO/PKGM/AppPkgMgt.robot b/MEC010p2/MEO/PKGM/AppPkgMgt.robot index 6c47a0d0fc10f4a6330f0c07efaf9de6e04ed973..529fd817d2ea28e3e969cf329969c531f458227c 100644 --- a/MEC010p2/MEO/PKGM/AppPkgMgt.robot +++ b/MEC010p2/MEO/PKGM/AppPkgMgt.robot @@ -9,31 +9,31 @@ Library BuiltIn Library OperatingSystem #Library MockServerLibrary +Test Setup Test Setup ${APP_PKG_ID_PLACEHOLDER} AppPkgInfo ${NO_ACTION} +Test Teardown Test TearDown ${APP_PKG_ID_PLACEHOLDER} AppPkgInfo ${NO_ACTION} + *** Test Cases *** TC_MEC_MEC010p2_MEO_PKGM_001_OK [Documentation] TP_MEC_MEC010p2_MEO_PKGM_001_OK ... Check that MEO creates a new App Package when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.1.3.1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 (OnboardedAppPkgInfo) - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.2.2-1 (AppPkg) + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.1.3.1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 (OnboardedAppPkgInfo) + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.2.2-1 (AppPkg) [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS Post Request to create new App Package Resource CreateAppPackage.json Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is AppPkgInfo Check HTTP Response Header Contains Location - Should Be Equal As Strings ${response['body']['appDVersion']} ${APP_PKG_VERSION} - Should Be Equal As Strings ${response['body']['checksum']['algorithm']} ${CHECKSUM} - Should Be Equal As Strings ${response['body']['operationalState']} ${OPERATIONAL_STATE} Should Be Equal As Strings ${response['body']['onboardingState']} ${ONBOARDING_STATE} - Should Be Equal As Strings ${response['body']['usageState']} ${USAGE_STATE} + [Teardown] Test TearDown ${response['body']['id']} ${None} ${REMOVE_ACTION} TC_MEC_MEC010p2_MEO_PKGM_001_BR [Documentation] TP_MEC_MEC010p2_MEO_PKGM_001_BR ... Check that MEO creates a new App Package when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.1.3.1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.2.2-1 (AppPkg) + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.1.3.1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.2.2-1 (AppPkg) [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS Post Request to create new App Package Resource CreateAppPackageBadRequest.json Check HTTP Response Status Code Is 400 @@ -43,36 +43,42 @@ TC_MEC_MEC010p2_MEO_PKGM_001_BR TC_MEC_MEC010p2_MEO_PKGM_002_01_OK [Documentation] TP_MEC_MEC010p2_MEO_PKGM_002_01_OK ... Check that MEO returns the list of App Packages when requested - Note 3 - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.1.3.2 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 Note 3 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.1.3.2 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 - Note 3 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS - GET all app Packages + [Setup] Test Setup ${None} CreateAppPackage ${REGISTER_ACTION} + GET all app Packages Check HTTP Response Status Code Is 200 FOR ${onBoardedAppPkgInfo} IN @{response['body']} Validate Json AppPkgInfo.schema.json ${onBoardedAppPkgInfo} + Should Be Equal As Strings ${onBoardedAppPkgInfo['onboardingState']} ${ONBOARDING_STATE} END - + [Teardown] Test TearDown ${setup_response['body']['id']} ${None} ${REMOVE_ACTION} TC_MEC_MEC010p2_MEO_PKGM_002_02_OK [Documentation] TP_MEC_MEC010p2_MEO_PKGM_002_02_OK ... Check that MEO returns the list of App Packages when requested - Note 3 - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.1.3.2 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 Note 3 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.1.3.2 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 Note 3 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Test Setup ${None} CreateAppPackage ${REGISTER_ACTION} GET all onboarded app Packages Check HTTP Response Status Code Is 200 FOR ${onBoardedAppPkgInfo} IN @{response['body']} Validate Json AppPkgInfo.schema.json ${onBoardedAppPkgInfo} + Should Be Equal As Strings ${onBoardedAppPkgInfo['onboardingState']} ${ONBOARDING_STATE} END - + [Teardown] Test TearDown ${setup_response['body']['id']} ${None} ${REMOVE_ACTION} + + TC_MEC_MEC010p2_MEO_PKGM_002_BR [Documentation] TP_MEC_MEO_PKGM_002_BR ... Check that MEO responds with an error when it receives ... a malformed request for retrieving the list of existing App Packages - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.1.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.1.3.2 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS GET all APP Packages with filters ${MALFORMED_FILTER_NAME} ${FILTER_VALUE} Check HTTP Response Status Code Is 400 @@ -81,38 +87,41 @@ TC_MEC_MEC010p2_MEO_PKGM_002_BR TC_MEC_MEC010p2_MEO_PKGM_003_01_OK [Documentation] TP_MEC_MEC010p2_MEO_PKGM_003_01_OK ... Check that MEO returns the an App Package when requested - Note 3 - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.2.3.2 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 Note 3 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.2.3.2 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 Note 3 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Test Setup ${None} CreateAppPackage ${REGISTER_ACTION} GET an app Package identified by ${ON_BOARDED_APP_PKG_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppPkgInfo Should Be Equal As Strings ${response['body']['id']} ${ON_BOARDED_APP_PKG_ID} - Should Be Equal As Strings ${response['body']['appName']} ${APP_NAME} - + [Teardown] Test TearDown ${setup_response['body']['id']} ${None} ${REMOVE_ACTION} + TC_MEC_MEC010p2_MEO_PKGM_003_02_OK [Documentation] TP_MEC_MEC010p2_MEO_PKGM_003_02_OK ... Check that MEO returns the an onboarded App Package when requested - Note 3 - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.2.3.2 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 Note 3 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.2.3.2 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 Note 3 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Test Setup ${None} CreateAppPackage ${REGISTER_ACTION} GET an onboarded app Package identified by ${ON_BOARDED_APP_PKG_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppPkgInfo Should Be Equal As Strings ${response['body']['id']} ${ON_BOARDED_APP_PKG_ID} - Should Be Equal As Strings ${response['body']['appName']} ${APP_NAME} + [Teardown] Test TearDown ${setup_response['body']['id']} ${None} ${REMOVE_ACTION} - + + TC_MEC_MEC010p2_MEO_PKGM_003_NF [Documentation] TP_MEC_MEC010p2_MEO_PKGM_003_NF ... Check that MEO responds with an error when it receives ... a request for retrieving a App Package referred with a wrong ID - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.2.3.2 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.2.3.2 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS GET an APP Package identified by ${NON_EXISTENT_APP_PKG_ID} Check HTTP Response Status Code Is 404 @@ -121,19 +130,22 @@ TC_MEC_MEC010p2_MEO_PKGM_003_NF TC_MEC_MEC010p2_MEO_PKGM_004_OK [Documentation] TP_MEC_MEO_PKGM_004_OK ... Check that MEO deletes an App Package when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.2.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.2.3.4 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS - Delete an individual APP Package identified by ${ON_BOARDED_APP_PKG_ID} + [Setup] Test Setup ${None} CreateAppPackage ${REGISTER_ACTION} + Delete an individual APP Package identified by ${setup_response['body']['id']} Check HTTP Response Status Code Is 204 Check HTTP Response Body is Empty + TC_MEC_MEC010p2_MEO_PKGM_004_NF [Documentation] TP_MEC_MEO_PKGM_004_NF ... Check that MEO responds with an error when it receives ... a request for deleting an App Package referred with a wrong ID - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.2.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.2.3.4 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Test Setup ${NON_EXISTENT_APP_PKG_ID} ${None} ${REMOVE_ACTION} Delete an individual APP Package identified by ${NON_EXISTENT_APP_PKG_ID} Check HTTP Response Status Code Is 404 @@ -141,29 +153,34 @@ TC_MEC_MEC010p2_MEO_PKGM_004_NF TC_MEC_MEC010p2_MEO_PKGM_005_OK [Documentation] TP_MEC_MEC010p2_MEO_PKGM_005_OK ... Check that MEO updates the operational state of an individual application package resource - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.2.3.5 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.2.3.5 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Test Setup ${None} CreateAppPackage ${REGISTER_ACTION} Update Operational State for an app Package ${ON_BOARDED_APP_PKG_ID} AppPkgInfoModifications.json Check HTTP Response Body Json Schema Is AppPkgInfoModifications Check HTTP Response Status Code Is 200 Should Be Equal As Strings ${response['body']['operationalState']} ${OPERATIONAL_STATE} + [Teardown] Test TearDown ${setup_response['body']['id']} ${None} ${REMOVE_ACTION} TC_MEC_MEC010p2_MEO_PKGM_005_BR [Documentation] TP_MEC_MEC010p2_MEO_PKGM_005_BR ... Check that MEO sends an error when it receives a malformed request to modify the operational state of an application package - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.2.3.5 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.2.3.5 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Test Setup ${None} CreateAppPackage ${REGISTER_ACTION} Update Operational State for an app Package ${ON_BOARDED_APP_PKG_ID} AppPkgInfoModificationsBadRequest.json Check HTTP Response Status Code Is 400 + [Teardown] Test TearDown ${setup_response['body']['id']} ${None} ${REMOVE_ACTION} TC_MEC_MEC010p2_MEO_PKGM_005_NF [Documentation] TP_MEC_MEC010p2_MEO_PKGM_005_NF ... Check that MEO responds with an error when it receives ... a request for updating an App Package referred with a wrong ID - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.2.3.5 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.2.3.5 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Test Setup ${NON_EXISTENT_APP_PKG_ID} ${None} ${REMOVE_ACTION} Update Operational State for an app Package ${NON_EXISTENT_APP_PKG_ID} AppPkgInfoModificationsBadRequest.json Check HTTP Response Status Code Is 404 @@ -171,68 +188,75 @@ TC_MEC_MEC010p2_MEO_PKGM_005_NF TC_MEC_MEC010p2_MEO_PKGM_006_OK [Documentation] TP_MEC_MEC010p2_MEO_PKGM_006_OK ... Check that MEO service returns an application package subscription when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.3.3.1 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.4 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.7 - [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.3.3.1 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.7 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Delete an App Package Subscription identified by ${SUBSCRIPTION_ID} Send a request for a subscription AppPkgSubscription.json Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is AppPkgSubscriptionInfo Should Be Equal As Strings ${response['body']['subscriptionType']} ${SUBSCRIPTION_TYPE} Should Be Equal As Strings ${response['body']['callbackUri']} ${CALLBACK_URI} + [TearDown] Delete an App Package Subscription identified by ${SUBSCRIPTION_ID} + TC_MEC_MEC010p2_MEO_PKGM_006_BR [Documentation] TP_MEC_MEC010p2_MEO_PKGM_006_BR ... Check that MEO service sends an error when it receives a malformed request for creating a new subscription on AppPackages - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.4.3.1", - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.4", - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.7 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.4.3.1", + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.4", + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.7 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS Send a request for a subscription AppPkgSubscriptionBadRequest.json Check HTTP Response Status Code Is 400 - TC_MEC_MEC010p2_MEO_PKGM_007_OK [Documentation] TP_MEC_MEC010p2_MEO_PKGM_007_OK ... Check that MEO service returns the list of Application Package Subscriptions when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.3.3.2 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.4 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.7 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.3.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.7 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Send a request for a subscription AppPkgSubscription.json Get all APP Package subscriptions Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppPkgSubscriptionLinkList + [TearDown] Delete an App Package Subscription identified by ${SUBSCRIPTION_ID} TC_MEC_MEC010p2_MEO_PKGM_008_OK [Documentation] TP_MEC_MEC010p2_MEO_PKGM_008_OK ... Check that MEO service returns an Application Package Subscription when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.4.3.2 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.4.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.4 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Send a request for a subscription AppPkgSubscription.json Get an individual APP Package subscriptions ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppPkgSubscriptionInfo Should Be Equal As Strings ${response['body']['id']} ${SUBSCRIPTION_ID} + [TearDown] Delete an App Package Subscription identified by ${SUBSCRIPTION_ID} TC_MEC_MEC010p2_MEO_PKGM_008_NF [Documentation] TP_MEC_MEC010p2_MEO_PKGM_008_NF ... Check that MEO service sends an error when it receives a query for a subscription on AppPackages with a wrong identifier - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.4.3.2 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.4 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.7 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.4.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.7 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Delete an App Package Subscription identified by ${NON_EXISTENT_SUBSCRIPTION_ID} Get an individual APP Package subscriptions ${NON_EXISTENT_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 - TC_MEC_MEC010p2_MEO_PKGM_009_OK [Documentation] TP_MEC_MEC010p2_MEO_PKGM_009_OK ... Check that MEO service deletes an Application Package Subscription when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.4.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.4.3.4 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Send a request for a subscription AppPkgSubscription.json Delete an App Package Subscription identified by ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 204 Check HTTP Response Body is Empty @@ -242,29 +266,44 @@ TC_MEC_MEC010p2_MEO_PKGM_009_NF [Documentation] TP_MEC_MEC010p2_MEO_PKGM_009_NF ... Check that MEO service sends an error when it receives a deletion request for a subscription on AppPackages ... with a wrong identifier - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.4.3.4 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.4 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.7 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.4.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.7 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Delete an App Package Subscription identified by NON_EXISTENT_SUBSCRIPTION_ID Delete an App Package Subscription identified by ${NON_EXISTENT_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 +##TODO integrate notification server +#TC_MEC_MEC010p2_MEO_PKGM_010_OK + #[Documentation] TP_MEC_MEC010p2_MEO_PKGM_009_NF + #... Check that the MEO service sends a application package notification + #... if the MEO service has an associated subscription and the event is generated + #... "ETSI GS MEC 010-2 3.1.1, clause 7.3.5.3.1", + #... "ETSI GS MEC 010-2 3.1.1, clause 6.2.3.6.2" //AppPkgNotification + #[Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + #[Setup] + #[Teardown] + TC_MEC_MEC010p2_MEO_PKGM_011_OK [Documentation] TP_MEC_MEC010p2_MEO_PKGM_011_OK ... Check that MEO reads the content of the AppD of on-boarded individual application package resources when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.6.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.6.3.2 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Post Request to create new App Package Resource CreateAppPackage.json Get an AppD from App Package identified by ${ON_BOARDED_APP_PKG_ID} Check HTTP Response Status Code Is 200 - + [TearDown] Delete an individual APP Package identified by ${ON_BOARDED_APP_PKG_ID} + TC_MEC_MEC010p2_MEO_PKGM_011_NF [Documentation] TP_MEC_MEC010p2_MEO_PKGM_011_NF ... Check that MEO responds with an error when it receives ... a request to retrieve an application descriptor referred with a wrong app package ID - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.6.3.2", - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.6.3.2", + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Delete an individual APP Package identified by ${NON_EXISTING_APPD_ID} Get an AppD from App Package identified by ${NON_EXISTING_APPD_ID} Check HTTP Response Status Code Is 404 @@ -272,24 +311,29 @@ TC_MEC_MEC010p2_MEO_PKGM_011_NF TC_MEC_MEC010p2_MEO_PKGM_012_01_OK [Documentation] TP_MEC_MEC010p2_MEO_PKGM_012_01_OK ... Check that MEO fetches the application package content identified by appPkgId when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.7.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.7.3.2 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Post Request to create new App Package Resource CreateAppPackage.json Get app Package identified by ${ON_BOARDED_APP_PKG_ID} ${ACCEPTED_CONTENT_TYPE_ZIP} Check HTTP Response Status Code Is 200 + [TearDown] Delete an individual APP Package identified by ${ON_BOARDED_APP_PKG_ID} + TC_MEC_MEC010p2_MEO_PKGM_012_02_OK [Documentation] TP_MEC_MEC010p2_MEO_PKGM_012_02_OK ... Check that MEO fetches the application package content identified by appPkgId when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.7.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.7.3.2 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Post Request to create new App Package Resource CreateAppPackage.json Get onboarded app Package identified by ${ON_BOARDED_APP_PKG_ID} ${ACCEPTED_CONTENT_TYPE_ZIP} Check HTTP Response Status Code Is 200 + [TearDown] Delete an individual APP Package identified by ${ON_BOARDED_APP_PKG_ID} TC_MEC_MEC010p2_MEO_PKGM_012_BR [Documentation] TP_MEC_MEC010p2_MEO_PKGM_012_BR ... Check that MEO service sends an error when it receives a malformed request - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.7.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.7.3.2 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS Get app Package identified by ${ON_BOARDED_APP_PKG_ID} ${WRONG_CONTENT_TYPE} Check HTTP Response Status Code Is 400 @@ -297,25 +341,63 @@ TC_MEC_MEC010p2_MEO_PKGM_012_BR TC_MEC_MEC010p2_MEO_PKGM_013_OK [Documentation] TP_MEC_MEC010p2_MEO_PKGM_013_OK ... Check that MEO accepts application package when submitted - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.7.3.3 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.1.2 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.7.3.3 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.1.2 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Delete an individual APP Package identified by ${APP_PKG_ID} Submit application package ${APP_PKG_ID} Check HTTP Response Status Code Is 202 + [TearDown] Delete an individual APP Package identified by ${APP_PKG_ID} TC_MEC_MEC010p2_MEO_PKGM_013_NF [Documentation] TP_MEC_MEC010p2_MEO_PKGM_013_NF ... Check that MEO returns an error when an application package with wrong id is submitted - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.7.3.3 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.1.2 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.7.3.3 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.1.2 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Delete an individual APP Package identified by ${NOT_EXISTING_APP_PKG_ID} Submit application package ${NOT_EXISTING_APP_PKG_ID} Check HTTP Response Status Code Is 404 *** Keywords *** +Test Setup + [Arguments] ${appPkgId} ${content} ${action} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + + IF '''${action}''' == '''${REGISTER_ACTION}''' + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + POST ${apiRoot}/${apiName}/${apiVersion}/app_packages ${body} + ${output}= Output response + Set Suite Variable ${setup_response} ${output} + END + + IF '''${action}''' == '''${REMOVE_ACTION}''' + DELETE ${apiRoot}/${apiName}/${apiVersion}/app_packages/${appPkgId} + END + +Test Teardown + [Arguments] ${appPkgId} ${content} ${action} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + + IF '''${action}''' == '''${REGISTER_ACTION}''' + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + POST ${apiRoot}/${apiName}/${apiVersion}/app_packages ${body} + END + + IF '''${action}''' == '''${REMOVE_ACTION}''' + DELETE ${apiRoot}/${apiName}/${apiVersion}/app_packages/${appPkgId} + END + + Post Request to create new App Package Resource [Arguments] ${content} Log Creating a new App Package @@ -482,7 +564,6 @@ Get an individual APP Package subscriptions Set Suite Variable ${response} ${output} - Delete an App Package Subscription identified by [Arguments] ${subId} Log Deleting a subscription diff --git a/MEC010p2/MEO/PKGM/environment/variables.txt b/MEC010p2/MEO/PKGM/environment/variables.txt index bdfa447cacf5d10a354d6c51e26e3f7e611f053d..660539dfb5380e105bae36516baadb6d6ebbc18b 100644 --- a/MEC010p2/MEO/PKGM/environment/variables.txt +++ b/MEC010p2/MEO/PKGM/environment/variables.txt @@ -10,6 +10,12 @@ ${apiRoot} ${apiName} app_pkgm ${apiVersion} v1 + +${REGISTER_ACTION} REGISTER +${REMOVE_ACTION} REMOVE +${NO_ACTION} NO_ACTION +${APP_PKG_ID_PLACEHOLDER} APP_PKG_ID_PLACEHOLDER + # Specific variables ${APP_PKG_NAME} appName ${APP_PKG_VERSION} APP_PKG_VERSION diff --git a/MEC010p2/MEO/PKGM/jsons/CreateAppPackage.json b/MEC010p2/MEO/PKGM/jsons/CreateAppPackage.json index b50ced36d2e5ba3de4e469553a795476496793f5..aee356207a2a6d40f388977fc6f129fd0ec068a0 100644 --- a/MEC010p2/MEO/PKGM/jsons/CreateAppPackage.json +++ b/MEC010p2/MEO/PKGM/jsons/CreateAppPackage.json @@ -1,28 +1,9 @@ { - "id": "AppPkgInfoId", - "appDid": "appdId", - "appName": "APP_NAME", - "appSoftwareVersion": "APP_SOFTWARE_VERSION", - "appDVersion": "APP_D_VERSION", - "checksum": { - "algorithm": "SHA-256", - "hash": "0x1234567890abcdef" - }, - "softwareImages": ["info about sofware image"], - "onBoardingState": "CREATED", - "operationalState": "ENABLED", - "usageState": "NOT_IN_USE", - "mecInfo": ["mecInfo"], - "links": { - "self": { - "href": "/app_lcm/v1/app_packages/123" - }, - "appD": { - "href": "/app_lcm/v1/on_boarded_app_packages/456/appd" - }, - "appPkgContent": { - "href": "/app_lcm/v1/on_boarded_app_packages/456/package_content" - } - } - + "appPkgName": "APP_NAME", + "appPkgVersion": "APP_SOFTWARE_VERSION", + "checksum": { + "algorithm": "SHA-256", + "hash": "0x1234567890abcdef" + }, + "appPkgPath": "someuri.com" } \ No newline at end of file diff --git a/MEC010p2/MEO/PKGM/jsons/CreateAppPackageBadRequest.json b/MEC010p2/MEO/PKGM/jsons/CreateAppPackageBadRequest.json index 0e0dcd235c4973becf25f38eb4e5bb26e154c86a..d10da001fc5f6d423f4d89b109dd880f98c6f1d1 100644 --- a/MEC010p2/MEO/PKGM/jsons/CreateAppPackageBadRequest.json +++ b/MEC010p2/MEO/PKGM/jsons/CreateAppPackageBadRequest.json @@ -1,3 +1,9 @@ { - + "appPkgNameERR": "APP_NAME", + "appPkgVersion": "APP_SOFTWARE_VERSION", + "checksum": { + "algorithm": "SHA-256", + "hash": "0x1234567890abcdef" + }, + "appPkgPath": "someuri.com" } \ No newline at end of file diff --git a/MEC010p2/MEPM/LCM/PlatformConfiguration.robot b/MEC010p2/MEPM/LCM/PlatformConfiguration.robot index 00632c9e56c817d045139f181cd1149b6233f2ef..792fa2658d94fadabdbe73514bd44dbc903b5c2e 100644 --- a/MEC010p2/MEPM/LCM/PlatformConfiguration.robot +++ b/MEC010p2/MEPM/LCM/PlatformConfiguration.robot @@ -13,19 +13,21 @@ Library OperatingSystem TC_MEC_MEC010p2_MEPM_LCM_001_OK [Documentation] TP_MEC_MEC010p2_MEPM_LCM_001_OK ... Check that MEC API provider has created the configuration information in AppD to the MEPM-V - ... ETSI GS MEC 010-2 2.2.1, clause 7.7.6.3.1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.21.2-1 #ConfigPlatformForAppRequest - + ... ETSI GS MEC 010-2 3.1.1, clause 7.7.6.3.1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.2.21.2-1 #ConfigPlatformForAppRequest + [Setup] Create new App Instance CreateAppInstanceRequest + ${APPD_ID_SET} Get value entry from JSON file CreateAppInstanceRequest appDId Request to configure Platform ${APP_INSTANCE_ID} ConfigPlatformForAppRequest Check HTTP Response Status Code Is 202 Check Response Header contains Location - + [Setup] Delete APP Instance ${APPD_ID_SET} + TC_MEC_MEC010p2_MEPM_LCM_001_BR [Documentation] TP_MEC_MEC010p2_MEPM_LCM_001_BR ... Check that MEC API provider sends an error when it receives a malformed request for the configuration information in AppD to the MEPM-V - ... ETSI GS MEC 010-2 2.2.1, clause 7.7.6.3.1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.21.2-1 #ConfigPlatformForAppRequest + ... ETSI GS MEC 010-2 3.1.1, clause 7.7.6.3.1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.2.21.2-1 #ConfigPlatformForAppRequest Request to configure Platform ${APP_INSTANCE_ID} ConfigPlatformForAppRequestBadRequest Check HTTP Response Status Code Is 400 @@ -36,14 +38,38 @@ TC_MEC_MEC010p2_MEPM_LCM_001_NF [Documentation] TP_MEC_MEC010p2_MEPM_LCM_001_BR ... "Check that MEC API provider sends an error when it receives a request ... for the configuration information in AppD to the MEPM-V with not valid app instance ID - ... ETSI GS MEC 010-2 2.2.1, clause 7.7.6.3.1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.21.2-1 #ConfigPlatformForAppRequest + ... ETSI GS MEC 010-2 3.1.1, clause 7.7.6.3.1 + ... ETS3.1.1MEC 010-2 3.1.1, Table 6.2.2.21.2-1 #ConfigPlatformForAppRequest Request to configure Platform ${NOT_EXISTING_APP_INSTANCE_ID} ConfigPlatformForAppRequest Check HTTP Response Status Code Is 404 *** Keywords *** +Create new App Instance + [Arguments] ${content} + Log Creating a new app package + 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}/app_instances ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + + +Delete APP Instance + [Arguments] ${app_instance_id} + Log Get single App Instance + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"*/*"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/app_instances/${app_instance_id} + ${output}= Output response + Set Suite Variable ${response} ${output} + + Request to configure Platform [Argument] ${appInstanceId} ${content} Log Request to configure platform diff --git a/MEC010p2/MEPM/LCM/json/CreateAppInstanceRequest.json b/MEC010p2/MEPM/LCM/json/CreateAppInstanceRequest.json new file mode 100644 index 0000000000000000000000000000000000000000..3691ba6ce55af3f45f518ea1313f56a99e904b5a --- /dev/null +++ b/MEC010p2/MEPM/LCM/json/CreateAppInstanceRequest.json @@ -0,0 +1,5 @@ +{ + "appDId": "e0deee2b-6e50-4f33-ab09-8bf0585025d3", + "appInstanceDescription": "description", + "appInstanceName": "name" +} \ No newline at end of file diff --git a/MEC010p2/MEPM/PKGM/AppPkgMgt.robot b/MEC010p2/MEPM/PKGM/AppPkgMgt.robot index e45756f868b4bca437d504afed47fbc7076bb676..c13a5a13ea9606e7bced82a97c3e6b647e8ed1e2 100644 --- a/MEC010p2/MEPM/PKGM/AppPkgMgt.robot +++ b/MEC010p2/MEPM/PKGM/AppPkgMgt.robot @@ -14,36 +14,43 @@ Library OperatingSystem TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_001_01_OK ... Check that MEPM returns the list of App Packages when requested - Note 3 - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.1.3.2 - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.1.3.2 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 Note 3 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.1.3.2 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Post APP Package CreateAppPackage.json + Set Variable ${APP_PKG_ID} ${response['body']['id']} GET all APP Packages Check HTTP Response Status Code Is 200 - FOR ${appPkg} IN @{response['body']} + + FOR ${appPkg} IN @{response['body']} Validate Json AppPkgInfo.schema.json ${appPkg} - END + Should Be Equal As Strings ${appPkg['onboardingState']} ${ONBOARDING_STATE} + + END + [TearDown] Delete APP Package ${APP_PKG_ID} + TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_001_02_OK ... Check that MEPM returns the list of on boarded app Packages when requested - Note 3 - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.1.3.2 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 Note 3 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.1.3.2 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Post APP Package CreateAppPackage.json + Set Variable ${APP_PKG_ID} ${response['body']['id']} GET all onboarded APP Packages Check HTTP Response Status Code Is 200 - FOR ${appPkg} IN @{response['body']} + FOR ${appPkg} IN @{response['body']} Validate Json AppPkgInfo.schema.json ${appPkg} - END + END + [TearDown] Delete APP Package ${APP_PKG_ID} TC_MEC_MEC010p2_MEPM_PKGM_001_BR [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_001_BR ... Check that MEPM responds with an error when it receives ... a malformed request for requesting the list of existing App Packages - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.1.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.1.3.2 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS GET all APP Packages with filters ${MALFORMED_FILTER_NAME} ${FILTER_VALUE} Check HTTP Response Status Code Is 400 @@ -52,38 +59,45 @@ TC_MEC_MEC010p2_MEPM_PKGM_001_BR TC_MEC_MEC010p2_MEPM_PKGM_002_01_OK [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_002_01_OK ... Check that MEPM returns the an App Package when requested - Note 3 - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.2.3.2 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 Note 3 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.2.3.2 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 Note 3 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS - GET an APP Package identified by ${APP_PKG_ID} + [Setup] Post APP Package CreateAppPackage.json + Set Test Variable ${APP_PKG_CREATED_ID} ${response['body']['id']} + GET an APP Package identified by ${APP_PKG_CREATED_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppPkgInfo Should Be Equal As Strings ${response['body']['id']} ${APP_PKG_ID} + [TearDown] Delete APP Package ${APP_PKG_CREATED_ID} TC_MEC_MEC010p2_MEPM_PKGM_002_02_OK [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_002_02_OK ... Check that MEPM returns the an App Package when requested - Note 3 - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.2.3.2 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 Note 3 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.2.3.2 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 Note 3 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS - GET an onboarded APP Package identified by ${APP_PKG_ID} + [Setup] Post APP Package CreateAppPackage.json + Set Test Variable ${APP_PKG_CREATED_ID} ${response['body']['id']} + GET an onboarded APP Package identified by ${APP_PKG_CREATED_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppPkgInfo Should Be Equal As Strings ${response['body']['id']} ${APP_PKG_ID} + [TearDown] Delete APP Package ${APP_PKG_CREATED_ID} TC_MEC_MEC010p2_MEPM_PKGM_002_NF [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_002_NF ... Check that MEPM responds with an error when it receives ... a request for returning a App Package referred with a wrong ID - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.2.3.2 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.3.3.2-1 Note 3 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.2.3.2 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.3.3.2-1 Note 3 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [TearDown] Delete APP Package ${NON_EXISTENT_APP_PKG_ID} GET an APP Package identified by ${NON_EXISTENT_APP_PKG_ID} Check HTTP Response Status Code Is 404 @@ -91,15 +105,16 @@ TC_MEC_MEC010p2_MEPM_PKGM_002_NF TC_MEC_MEC010p2_MEPM_PKGM_003_OK [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_003_OK ... Check that MEPM service returns an application package subscription when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.3.3.1", - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.4 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.7 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.3.3.1", + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.7 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS Send a request for a subscription AppPkgSubscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is AppPkgSubscriptionInfo Should Be Equal As Strings ${response}[body][subscriptionType] AppPackageOnBoardingSubscription Should Be Equal As Strings ${response}[body][callbackUri] ${CALLBACK_URI} + [TearDown] Delete an App Package Subscription identified by ${response}[body][id] @@ -107,7 +122,7 @@ TC_MEC_MEC010p2_MEPM_PKGM_003_BR [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_003_BR ... Check that MEPM service sends an error when it receives a ... malformed request for creating a new subscription on AppPackages - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.3.3.1 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.3.3.1 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS Send a request for a subscription AppPkgSubscriptionBadRequest Check HTTP Response Status Code Is 400 @@ -116,64 +131,76 @@ TC_MEC_MEC010p2_MEPM_PKGM_003_BR TC_MEC_MEC010p2_MEPM_PKGM_004_OK [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_006_OK ... Check that MEPM service returns the list of Application Package Subscriptions when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.3.3.2 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.4 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.7 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.3.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 6.3.5.2 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Send a request for a subscription AppPkgSubscription + Set Test Variable ${SUB_ID} ${response}[body][id] Get all APP Package subscriptions Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppPkgSubscriptionLinkList + [TearDown] Delete an App Package Subscription identified by ${SUB_ID} TC_MEC_MEC010p2_MEPM_PKGM_005_OK [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_005_OK ... Check that MEPM service returns an Application Package Subscription when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.4.3.2 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.4.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.4 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS - Get an individual APP Package subscriptions ${SUBSCRIPTION_ID} + [Setup] Send a request for a subscription AppPkgSubscription + Set Test Variable ${SUB_ID} ${response['body']['id']} + Get an individual APP Package subscriptions ${SUB_ID} Check HTTP Response Body Json Schema Is AppPkgSubscriptionInfo Check HTTP Response Status Code Is 200 - Should Be Equal As Strings ${response}[body][id] ${SUBSCRIPTION_ID} - Should Contain ${response}[body][_links][self][href] /app_pkgm/v1/subscriptions/${SUBSCRIPTION_ID} + Should Be Equal As Strings ${response}[body][id] ${SUB_ID} + Should Contain ${response}[body][_links][self][href] /app_pkgm/v1/subscriptions/${SUB_ID} + [TearDown] Delete an App Package Subscription identified by ${SUB_ID} TC_MEC_MEC010p2_MEPM_PKGM_005_NF [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_005_NF ... Check that MEPM service sends an error when it receives a query for a subscription on AppPackages ... with a wrong identifier - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.4.3.2 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.4 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.7 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.4.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.7 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Delete an App Package Subscription identified by ${NON_EXISTENT_SUBSCRIPTION_ID} Get an individual APP Package subscriptions ${NON_EXISTENT_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 - + TC_MEC_MEC010p2_MEPM_PKGM_006_OK [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_006_OK ... Check that MEPM service deletes an Application Package Subscription when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.4.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.4.3.4 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS - Delete an App Package Subscription identified by ${SUBSCRIPTION_ID} + [Setup] Send a request for a subscription AppPkgSubscription + Set Test Variable ${SUB_ID} ${response['body']['id']} + Delete an App Package Subscription identified by ${SUB_ID} Check HTTP Response Status Code Is 204 TC_MEC_MEC010p2_MEPM_PKGM_006_NF [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_006_NF ... Check that MEPM service sends an error when it receives a deletion request for a subscription on AppPackages ... with a wrong identifier - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.4.3.4 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.4 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.3.7 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.4.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.3.7 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + [Setup] Delete an App Package Subscription identified by ${NON_EXISTENT_SUBSCRIPTION_ID} Delete an App Package Subscription identified by ${NON_EXISTENT_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 +##### TP_MEC_MEC010p2_MEPM_PKGM_007_OK TODO + + TC_MEC_MEC010p2_MEPM_PKGM_008_NA [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_008_NA ... Check that MEPM responds with an error when it receives ... a POST request referring an application descriptor AppD - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.6.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.6.3.4 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS Post AppD by ${APPD_ID} Check HTTP Response Status Code Is 405 @@ -181,20 +208,25 @@ TC_MEC_MEC010p2_MEPM_PKGM_008_NA TC_MEC_MEC010p2_MEPM_PKGM_009_OK [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_009_OK ... Check that MEPM returns the Application Descriptor contained on a on-boarded Application Package when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.6.3.2 - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.1.2 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.6.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.1.2 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS - Get AppD by ${APPD_ID} + [Setup] Post APP Package CreateAppPackage.json + Set Test Variable ${APP_PKG_ID} ${response['body']['id']} + Set Test Variable ${CREATED_APPD_ID} ${response['body']['appDId']} + Get AppD by ${CREATED_APPD_ID} Check HTTP Response Status Code Is 200 + [TearDown] Delete APP Package ${APP_PKG_ID} TC_MEC_MEC010p2_MEPM_PKGM_009_NF [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_009_NF ... Check that MEPM responds with an error when it receives ... a request for returning a App Descriptor referred with a wrong App Package ID - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.6.3.2", - ... ETSI GS MEC 010-2 2.2.1, clause 6.2.1.2 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.6.3.2", + ... ETSI GS MEC 010-2 3.1.1, clause 6.2.1.2 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS - Get AppD by ${NON_EXISTENT_APPD_ID} + [Setup] Delete APP Package ${NON_EXISTENT_APP_PKG_ID} + Get AppD by ${NON_EXISTENT_APP_PKG_ID} Check HTTP Response Status Code Is 404 @@ -203,7 +235,7 @@ TC_MEC_MEC010p2_MEPM_PKGM_010_FO [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_010_FO ... Check that MEPM responds with an error when it receives ... a PUT request referring an application descriptor AppD - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.6.3.3 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.6.3.3 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS Put on AppD endpoint ${NON_EXISTENT_APP_PKG_ID} Check HTTP Response Status Code Is 403 @@ -212,7 +244,7 @@ TC_MEC_MEC010p2_MEPM_PKGM_011_NA [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_011_NA ... Check that MEPM responds with an error when it receives ... a DELETE request referring an application descriptor AppD - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.6.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.6.3.4 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS Delete on AppD endpoint ${APP_PKG_ID} Check HTTP Response Status Code Is 405 @@ -221,26 +253,36 @@ TC_MEC_MEC010p2_MEPM_PKGM_011_NA TC_MEC_MEC010p2_MEPM_PKGM_012_01_OK [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_012_01_OK ... Check that MEPM fetches the on-boarded application package content identified by appPkgId when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.7.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.7.3.2 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS - Get application package by AppId ${APP_PKG_ID} + [Setup] Post APP Package CreateAppPackage.json + Set Test Variable ${APP_PKG_ID} ${response['body']['id']} + Set Test Variable ${CREATED_APPD_ID} ${response['body']['appDId']} + Get application package by AppId ${CREATED_APPD_ID} Check HTTP Response Status Code Is 200 + [TearDown] Delete APP Package ${APP_PKG_ID} + TC_MEC_MEC010p2_MEPM_PKGM_012_02_OK [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_012_02_OK ... Check that MEPM fetches the on-boarded application package content identified by appDId when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.7.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.7.3.2 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS - Get onboarded application package by AppdId ${APPD_ID} + [Setup] Post APP Package CreateAppPackage.json + Set Test Variable ${APP_PKG_ID} ${response['body']['id']} + Set Test Variable ${CREATED_APPD_ID} ${response['body']['appDId']} + + Get onboarded application package by AppdId ${CREATED_APPD_ID} Check HTTP Response Status Code Is 200 + [TearDown] Delete APP Package ${APP_PKG_ID} TC_MEC_MEC010p2_MEPM_PKGM_012_01_NF [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_012_01_NF ... Check that MEPM returns an error when performing ... a request for returning a App Descriptor referred with a wrong App Package ID - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.7.3.2 - [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.7.3.2 + [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS Get application package by AppId ${NON_EXISTENT_APP_PKG_ID} Check HTTP Response Status Code Is 404 @@ -249,7 +291,7 @@ TC_MEC_MEC010p2_MEPM_PKGM_012_02_NF [Documentation] TP_MEC_MEC010p2_MEPM_PKGM_012_02_NF ... Check that MEPM returns an error when performing ... a request for returning an onboarded App Descriptor referred with a wrong App Package ID - ... ETSI GS MEC 010-2 2.2.1, clause 7.3.7.3.2 + ... ETSI GS MEC 010-2 3.1.1, clause 7.3.7.3.2 [Tags] PIC_APP_PACKAGE_MANAGEMENT INCLUDE_UNDEFINED_SCHEMAS Get onboarded application package by AppdId ${NON_EXISTENT_APP_PKG_ID} Check HTTP Response Status Code Is 404 @@ -257,15 +299,27 @@ TC_MEC_MEC010p2_MEPM_PKGM_012_02_NF *** Keywords *** Post APP Package - Log Getting all App Packages + [Arguments] ${content} Set Headers {"Accept":"application/json"} Set Headers {"Content-Type":"*/*"} Set Headers {"Authorization":"${TOKEN}"} Post ${apiRoot}/${apiName}/${apiVersion}/app_packages + ${path} Catenate SEPARATOR= jsons/ ${content} + ${body} Get File ${path} ${output}= Output response Set Suite Variable ${response} ${output} +Delete APP Package + [Arguments] ${app_pkg_id} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"*/*"} + Set Headers {"Authorization":"${TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiVersion}/app_packages/${app_pkg_id} + ${output}= Output response + Set Suite Variable ${response} ${output} + + GET all APP Packages Log Getting all App Packages Set Headers {"Accept":"application/json"} diff --git a/MEC010p2/MEPM/PKGM/environment/variables.txt b/MEC010p2/MEPM/PKGM/environment/variables.txt index b71bde6b1c7d229cc9a662b988a2bdf90fb903ae..fc95e302a32d96786b394947f023c44679d2213e 100644 --- a/MEC010p2/MEPM/PKGM/environment/variables.txt +++ b/MEC010p2/MEPM/PKGM/environment/variables.txt @@ -22,4 +22,5 @@ ${MALFORMED_FILTER_NAME} operationalStatus ${FILTER_VALUE} ENABLED ${NON_EXISTENT_APP_PKG_ID} NON_EXISTENT_APP_PKG_ID ${NON_EXISTENT_SUBSCRIPTION_ID} NON_EXISTENT_SUBSCRIPTION_ID -${NON_EXISTENT_APPD_ID} NON_EXISTENT_APPD_ID \ No newline at end of file +${NON_EXISTENT_APPD_ID} NON_EXISTENT_APPD_ID +${ONBOARDING_STATE} CREATED \ No newline at end of file diff --git a/MEC010p2/MEPM/PKGM/jsons/CreateAppPackage.json b/MEC010p2/MEPM/PKGM/jsons/CreateAppPackage.json new file mode 100644 index 0000000000000000000000000000000000000000..aee356207a2a6d40f388977fc6f129fd0ec068a0 --- /dev/null +++ b/MEC010p2/MEPM/PKGM/jsons/CreateAppPackage.json @@ -0,0 +1,9 @@ +{ + "appPkgName": "APP_NAME", + "appPkgVersion": "APP_SOFTWARE_VERSION", + "checksum": { + "algorithm": "SHA-256", + "hash": "0x1234567890abcdef" + }, + "appPkgPath": "someuri.com" +} \ No newline at end of file diff --git a/MEC010p2/MEX/LCM/AppInstanceMgmt.robot b/MEC010p2/MEX/LCM/AppInstanceMgmt.robot index 45d7cb0c0781a7e358e2e4211306c25365431e61..2b7f527f6b96aeb71a7366df8d3f39b1463b48cc 100644 --- a/MEC010p2/MEX/LCM/AppInstanceMgmt.robot +++ b/MEC010p2/MEX/LCM/AppInstanceMgmt.robot @@ -7,83 +7,96 @@ Resource ../../../GenericKeywords.robot Library REST ${MEPM_SCHEMA}://${MEPM_HOST}:${MEPM_PORT} ssl_verify=false Library BuiltIn Library OperatingSystem +Library String *** Test Cases *** TC_MEC_MEC010p2_MEX_LCM_001_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_001_OK ... Check that MEC API provider creates a new App Package when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.1.3.1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.3.2-1 #CreateAppInstanceRequest - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.4.2-1 #AppInstanceInfo + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.1.3.1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.2.3.2-1 #CreateAppInstanceRequest + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.2.4.2-1 #AppInstanceInfo Create new App Instance CreateAppInstanceRequest + ${APPD_ID_SET} Get value entry from JSON file CreateAppInstanceRequest appDId Check HTTP Response Status Code Is 201 + ##TODO validate against the new schema Check HTTP Response Body Json Schema Is AppInstanceInfo Check HTTP Response Header Contains Location - Should Be Equal As Strings ${response['body']['appDId']} ${APPD_ID} + Should Be Equal As Strings ${response['body']['appDId']} ${APPD_ID_SET} Should Be Equal As Strings ${response['body']['instantiationState']} NOT_INSTANTIATED - + [TearDown] Delete APP Instance ${response['body']['id']} TC_MEC_MEC010p2_MEX_LCM_001_BR [Documentation] TP_MEC_MEC010p2_MEX_LCM_001_BR ... Check that MEC API provider sends an error when it receives a malformed request for the creation of a new App Instance - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.1.3.1 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.3.2-1 #CreateAppInstanceRequest - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.4.2-1 #AppInstanceInfo + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.1.3.1 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.2.3.2-1 #CreateAppInstanceRequest + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.2.4.2-1 #AppInstanceInfo Create new App Instance CreateAppInstanceRequestBadRequest Check HTTP Response Status Code Is 400 - - TC_MEC_MEC010p2_MEX_LCM_002_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_002_OK ... Check that MEC API provider retrieves the list of App instances when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.1.3.2 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.4.2-1 #AppInstanceInfo + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.1.3.2 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.2.4.2-1 #AppInstanceInfo + [Setup] Create new App Instance CreateAppInstanceRequest + Set Test Variable ${NEW_APP_INSTANCE_ID} ${response['body']['id']} GET all APP Instances Check HTTP Response Status Code Is 200 FOR ${appInstance} IN @{response['body']} + ##TODO validate against the new schema Validate Json AppInstanceInfo.schema.json ${appInstance} - Log ${appInstance} - ${passed} Run Keyword And Return Status Should Be Equal As Strings ${appInstance}[id] ${APP_INSTANCE_ID} + ${passed} Run Keyword And Return Status Should Be Equal As Strings ${appInstance}[id] ${NEW_APP_INSTANCE_ID} Exit For Loop If ${passed} END Should Be True ${passed} + [TearDown] Delete APP Instance ${NEW_APP_INSTANCE_ID} + TC_MEC_MEC010p2_MEX_LCM_003_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_003_OK ... Check that MEC API provider retrieves an App Package when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.2.3.2 - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.4.2-1 #AppInstanceInfo - GET APP Instance ${APP_INSTANCE_ID} + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.2.3.2 + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.2.4.2-1 #AppInstanceInfo + [Setup] Create new App Instance CreateAppInstanceRequest + Set Test Variable ${NEW_APP_INSTANCE_ID} ${response['body']['id']} + GET APP Instance ${NEW_APP_INSTANCE_ID} Check HTTP Response Status Code Is 200 + ##TODO validate against the new schema Check HTTP Response Body Json Schema Is AppInstanceInfo Log ${response['body']} - Should Be Equal As Strings ${response['body']['id']} ${APP_INSTANCE_ID} + Should Be Equal As Strings ${response['body']['id']} ${NEW_APP_INSTANCE_ID} + [TearDown] Delete APP Instance ${NEW_APP_INSTANCE_ID} TC_MEC_MEC010p2_MEX_LCM_003_NF [Documentation] TP_MEC_MEC010p2_MEX_LCM_003_NF ... Check that MEC API provider fails on deletion of an App Instance when requested using wrong appInstanceId - ... ETSI GS MEC 010-2 2.2.1, Table 6.2.2.4.2-1 #AppInstanceInfo + ... ETSI GS MEC 010-2 3.1.1, Table 6.2.2.4.2-1 #AppInstanceInfo + [Setup] Delete APP Instance ${NOT_EXISTING_APP_INSTANCE_ID} GET APP Instance ${NOT_EXISTING_APP_INSTANCE_ID} Check HTTP Response Status Code Is 404 TC_MEC_MEC010p2_MEX_LCM_004_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_003_OK ... Check that MEC API provider service deletes an App Instance when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.2.3.4 - Delete APP Instance ${APP_INSTANCE_ID} + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.2.3.4 + [Setup] Create new App Instance CreateAppInstanceRequest + Set Test Variable ${NEW_APP_INSTANCE_ID} ${response['body']['id']} + Delete APP Instance ${NEW_APP_INSTANCE_ID} Check HTTP Response Status Code Is 204 TC_MEC_MEC010p2_MEX_LCM_004_NF [Documentation] TP_MEC_MEC010p2_MEX_LCM_004_NF ... Check that MEC API provider fails on deletion of an App Instance when requested using wrong appInstanceId - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.2.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.2.3.4 + [Setup] Delete APP Instance ${NOT_EXISTING_APP_INSTANCE_ID} Delete APP Instance ${NOT_EXISTING_APP_INSTANCE_ID} Check HTTP Response Status Code Is 404 @@ -91,17 +104,21 @@ TC_MEC_MEC010p2_MEX_LCM_004_NF TC_MEC_MEC010p2_MEX_LCM_005_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_005_OK ... Check that MEC API provider service instantiates an App Instance when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.6.3.1 - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.7.2-1 #InstantiateAppRequest - Instantiate App Request ${APP_INSTANCE_ID} InstantiateAppRequest + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.6.3.1 + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.7.2-1 #InstantiateAppRequest + [Setup] Create new App Instance CreateAppInstanceRequest + Set Test Variable ${NEW_APP_INSTANCE_ID} ${response['body']['id']} + Instantiate App Request ${NEW_APP_INSTANCE_ID} InstantiateAppRequest Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location + [TearDown] Delete APP Instance ${NEW_APP_INSTANCE_ID} + TC_MEC_MEC010p2_MEX_LCM_005_BR [Documentation] TP_MEC_MEC010p2_MEX_LCM_005_BR ... Check that MEC API provider service fails to instantiate an App Instance when it receives a malformed request - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.6.3.1 - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.7.2-1 #InstantiateAppRequest + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.6.3.1 + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.7.2-1 #InstantiateAppRequest Instantiate App Request ${APP_INSTANCE_ID} InstantiateAppRequestBadRequest Check HTTP Response Status Code Is 400 @@ -110,8 +127,9 @@ TC_MEC_MEC010p2_MEX_LCM_005_BR TC_MEC_MEC010p2_MEX_LCM_005_NF [Documentation] TP_MEC_MEC010p2_MEX_LCM_005_NF ... Check that MEC API provider service fails to instantiate an App Instance when it receives a request related to a not existing App Instance - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.6.3.1 - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.7.2-1 #InstantiateAppRequest + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.6.3.1 + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.7.2-1 #InstantiateAppRequest + [Setup] Delete APP Instance ${NOT_EXISTING_APP_INSTANCE_ID} Instantiate App Request ${NOT_EXISTING_APP_INSTANCE_ID} InstantiateAppRequest Check HTTP Response Status Code Is 404 @@ -120,17 +138,21 @@ TC_MEC_MEC010p2_MEX_LCM_005_NF TC_MEC_MEC010p2_MEX_LCM_006_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_006_OK ... Check that MEC API provider service terminates an App Instance when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.7.3.1 - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.9.2-1 #TerminateAppRequest - Terminate App Request ${APP_INSTANCE_ID} TerminateAppRequest + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.7.3.1 + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.9.2-1 #TerminateAppRequest + [Setup] Create and Instantiate App Instance CreateAppInstanceRequest InstantiateAppRequest + ##TODO sleep for a while because the instantiation is not immediate + Terminate App Request ${APP_ID} TerminateAppRequest Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location + [TearDown] Delete APP Instance ${APP_ID} + TC_MEC_MEC010p2_MEX_LCM_006_BR [Documentation] TP_MEC_MEC010p2_MEX_LCM_006_OK ... Check that MEC API provider service fails to terminate an App Instance when it receives a malformed request - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.7.3.1 - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.9.2-1 #TerminateAppRequest + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.7.3.1 + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.9.2-1 #TerminateAppRequest Terminate App Request ${APP_INSTANCE_ID} TerminateAppRequestBadRequest Check HTTP Response Status Code Is 400 @@ -138,38 +160,42 @@ TC_MEC_MEC010p2_MEX_LCM_006_BR TC_MEC_MEC010p2_MEX_LCM_006_NF [Documentation] TP_MEC_MEC010p2_MEX_LCM_006_NF ... Check that MEC API provider service fails to terminate an App Instance when it receives a request related to a not existing App Instance - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.7.3.1 - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.9.2-1 #TerminateAppRequest + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.7.3.1 + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.9.2-1 #TerminateAppRequest + [Setup] Delete APP Instance ${NOT_EXISTING_APP_INSTANCE_ID} Terminate App Request ${NOT_EXISTING_APP_INSTANCE_ID} TerminateAppRequest Check HTTP Response Status Code Is 404 -TPC_MEC_MEC010p2_MEX_LCM_007_OK +TC_MEC_MEC010p2_MEX_LCM_007_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_007_OK ... Check that MEC API provider service changes the status of an App Instance from its INITIAL_STATE to a given FINAL_STATE, when requested. ... The following combinations INITIAL_STATE - FINAL_STATE are supported: ... - STARTED/STOP ... - STOPPED/STARTCheck that MEC API provider service terminates an App Instance when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.8.3.1 - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.8.2-1 #OperateAppRequest + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.8.3.1 + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.8.2-1 #OperateAppRequest + [Setup] Create and Instantiate App Instance CreateAppInstanceRequest InstantiateAppRequest + ##TODO sleep for a while because the instantiation is not immediate Operate App Request ${APP_INSTANCE_ID} OperateAppRequest Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location + [TearDown] Delete APP Instance ${APP_ID} TC_MEC_MEC010p2_MEX_LCM_007_BR [Documentation] TP_MEC_MEC010p2_MEX_LCM_007_BR ... Check that MEC API provider service fails to operate on an App Instance when it receives a malformed request - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.8.3.1 - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.8.2-1 #OperateAppRequest + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.8.3.1 + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.8.2-1 #OperateAppRequest Operate App Request ${APP_INSTANCE_ID} OperateAppRequestBadRequest Check HTTP Response Status Code Is 400 TC_MEC_MEC010p2_MEX_LCM_007_NF [Documentation] TP_MEC_MEC010p2_MEX_LCM_007_NF ... Check that MEC API provider service fails to change the status of an App Instance when it receives a request related to a not existing App Instance - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.8.3.1 - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.8.2-1 #OperateAppRequest + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.8.3.1 + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.8.2-1 #OperateAppRequest Operate App Request ${NOT_EXISTING_APP_INSTANCE_ID} OperateAppRequest Check HTTP Response Status Code Is 404 @@ -178,38 +204,33 @@ TC_MEC_MEC010p2_MEX_LCM_007_NF TC_MEC_MEC010p2_MEX_LCM_008_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_008_OK ... Check that MEC API provider service retrieves info about LCM Operation Occurrence on App Instances when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.9.3.2 - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.13.2-1 #AppLcmOpOcc + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.9.3.2 + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.13.2-1 #AppLcmOpOcc + [Setup] Create and Instantiate App Instance CreateAppInstanceRequest InstantiateAppRequest GET all App LCM op Occs Check HTTP Response Status Code Is 200 FOR ${appLcmOpOcc} IN @{response['body']} - ##The referred JSON schema is in compliance with MEC010p2 v2.1.1 but not with v2.2.1. Some attributes are missing in the older version Validate Json AppLcmOpOcc.schema.json ${appLcmOpOcc} - ${passed} Run Keyword And Return Status Should Be Equal As Strings ${appLcmOpOcc}[id] ${APP_LCM_OP_OCC_ID} - Exit For Loop If ${passed} END - - Should Be True ${passed} - - TC_MEC_MEC010p2_MEX_LCM_009_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_009_OK ... Check that MEC API provider service retrieves info about LCM Operation Occurrence on an App Instance when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.10.3.2 - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.13.2-1 #AppLcmOpOcc - GET App LCM op Occ ${APP_LCM_OP_OCC_ID} + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.10.3.2 + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.13.2-1 #AppLcmOpOcc + [Setup] Create and Instantiate App Instance CreateAppInstanceRequest InstantiateAppRequest + GET App LCM op Occ ${APP_LCM_OP_OCCS_ID} Check HTTP Response Status Code Is 200 Validate Json AppLcmOpOcc.schema.json ${response}[body] - Should Be Equal As Strings ${response}[body][id] ${APP_LCM_OP_OCC_ID} + Should Be Equal As Strings ${response}[body][id] ${APP_LCM_OP_OCCS_ID} TC_MEC_MEC010p2_MEX_LCM_009_NF [Documentation] TP_MEC_MEC010p2_MEX_LCM_009_NF ... Check that MEC API provider service sends an error when it receives a query for a not existing LCM Operation Occurence - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.10.3.2 - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.13.2-1 #AppLcmOpOcc + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.10.3.2 + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.13.2-1 #AppLcmOpOcc GET App LCM op Occ ${NOT_EXISTING_APP_LCM_OP_OCC_ID} Check HTTP Response Status Code Is 404 @@ -220,82 +241,92 @@ TC_MEC_MEC010p2_MEX_LCM_010_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_010_OK ... Check that MEC API provider service creates a LCM Subscription when requested, where the subscription request can ... have SUBSCRIPTION_TYPE AppInstanceStateChangeSubscription or AppLcmOpOccStateChangeSubscription - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.3.3.1, - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.12.2-1 #AppInstSubscriptionRequest - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.14.2-1 #AppLcmOpOccSubscriptionRequest - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.25.2-1 #AppInstIdCreationSubscriptionRequest - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.28.2-1 #AppInstIdDeletionSubscriptionRequest - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.10.2-1 #AppInstSubscriptionInfo - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.15.2-1 #AppLcmOpOccSubscriptionInfo - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.26.2-1 #AppInstIdCreationSubscriptionInfo - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.29.2-1 #AppInstIdDeletionSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.3.3.1, + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.12.2-1 #AppInstSubscriptionRequest + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.14.2-1 #AppLcmOpOccSubscriptionRequest + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.25.2-1 #AppInstIdCreationSubscriptionRequest + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.28.2-1 #AppInstIdDeletionSubscriptionRequest + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.10.2-1 #AppInstSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.15.2-1 #AppLcmOpOccSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.26.2-1 #AppInstIdCreationSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.29.2-1 #AppInstIdDeletionSubscriptionInfo Send a request for a subscription AppInstSubscriptionRequest Check HTTP Response Status Code Is 201 Validate Json AppInstSubscriptionRequest.schema.json ${response}[body] - - Should Be Equal As Strings ${response['body']['subscriptionType']} ${SUB_TYPE} - Should Be Equal As Strings ${response['body']['callbackUri']} ${CALLBACK_URI} - + ${REQ_SUBSCRIPTION_TYPE} Get value entry from JSON file AppInstSubscriptionRequest subscriptionType + ${REQ_CALLBACK_URI} Get value entry from JSON file AppInstSubscriptionRequest callbackUri + + Should Be Equal As Strings ${response['body']['subscriptionType']} ${REQ_SUBSCRIPTION_TYPE} + Should Be Equal As Strings ${response['body']['callbackUri']} ${REQ_CALLBACK_URI} + [TearDown] Send a request for deleting a subscription ${response['body']['id']} + TC_MEC_MEC010p2_MEX_LCM_010_BR [Documentation] TP_MEC_MEC010p2_MEX_LCM_010_BR ... Check that MEC API provider service sends an error when it receives a malformed request to create a LCM Subscription - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.3.3.1, - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.12.2-1 #AppInstSubscriptionRequest - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.14.2-1 #AppLcmOpOccSubscriptionRequest - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.25.2-1 #AppInstIdCreationSubscriptionRequest - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.28.2-1 #AppInstIdDeletionSubscriptionRequest - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.10.2-1 #AppInstSubscriptionInfo - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.15.2-1 #AppLcmOpOccSubscriptionInfo - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.26.2-1 #AppInstIdCreationSubscriptionInfo - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.29.2-1 #AppInstIdDeletionSubscriptionInfo - + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.3.3.1, + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.12.2-1 #AppInstSubscriptionRequest + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.14.2-1 #AppLcmOpOccSubscriptionRequest + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.25.2-1 #AppInstIdCreationSubscriptionRequest + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.28.2-1 #AppInstIdDeletionSubscriptionRequest + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.10.2-1 #AppInstSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.15.2-1 #AppLcmOpOccSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.26.2-1 #AppInstIdCreationSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.29.2-1 #AppInstIdDeletionSubscriptionInfo + Send a request for a subscription AppInstSubscriptionRequestBadRequest Check HTTP Response Status Code Is 400 + TC_MEC_MEC010p2_MEX_LCM_011_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_011_OK ... Check that MEC API provider service sends the list of LCM Subscriptions when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.3.3.2, - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.12.2-1 #AppInstSubscriptionRequest - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.14.2-1 #AppLcmOpOccSubscriptionRequest - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.25.2-1 #AppInstIdCreationSubscriptionRequest - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.28.2-1 #AppInstIdDeletionSubscriptionRequest - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.10.2-1 #AppInstSubscriptionInfo - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.15.2-1 #AppLcmOpOccSubscriptionInfo - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.26.2-1 #AppInstIdCreationSubscriptionInfo - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.29.2-1 #AppInstIdDeletionSubscriptionInfo - + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.3.3.2, + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.12.2-1 #AppInstSubscriptionRequest + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.14.2-1 #AppLcmOpOccSubscriptionRequest + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.25.2-1 #AppInstIdCreationSubscriptionRequest + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.28.2-1 #AppInstIdDeletionSubscriptionRequest + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.10.2-1 #AppInstSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.15.2-1 #AppLcmOpOccSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.26.2-1 #AppInstIdCreationSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.29.2-1 #AppInstIdDeletionSubscriptionInfo + [Setup] Send a request for a subscription AppInstSubscriptionRequest + Set Test Variable ${SUB_ID} ${response['body']['id']} + Send a request for retrieving all subscriptions Check HTTP Response Status Code Is 200 Validate Json AppInstanceSubscriptionLinkList.schema.json ${response}[body] + [TearDown] Send a request for deleting a subscription ${SUB_ID} + TC_MEC_MEC010p2_MEX_LCM_012_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_012_OK ... Check that MEC API provider service sends the information about an existing LCM subscription when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.4.3.2 - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.10.2-1 #AppInstSubscriptionInfo - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.15.2-1 #AppLcmOpOccSubscriptionInfo - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.26.2-1 #AppInstIdCreationSubscriptionInfo - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.29.2-1 #AppInstIdDeletionSubscriptionInfo - - Send a request for retrieving a subscription ${SUBSCRIPTION_ID} + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.4.3.2 + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.10.2-1 #AppInstSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.15.2-1 #AppLcmOpOccSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.26.2-1 #AppInstIdCreationSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.29.2-1 #AppInstIdDeletionSubscriptionInfo + [Setup] Send a request for a subscription AppInstSubscriptionRequest + Set Test Variable ${SUB_ID} ${response['body']['id']} + Send a request for retrieving a subscription ${SUB_ID} Check HTTP Response Status Code Is 200 - Should Be Equal As Strings ${response['body']['id']} ${SUBSCRIPTION_ID} + Should Be Equal As Strings ${response['body']['id']} ${SUB_ID} + [TearDown] Send a request for deleting a subscription ${SUB_ID} TC_MEC_MEC010p2_MEX_LCM_012_NF [Documentation] TP_MEC_MEC010p2_MEX_LCM_012_NF ... Check that MEC API provider service sends an error when it receives a query for a not existing LCM Subscription - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.4.3.2 - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.10.2-1 #AppInstSubscriptionInfo - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.15.2-1 #AppLcmOpOccSubscriptionInfo - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.26.2-1 #AppInstIdCreationSubscriptionInfo - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.29.2-1 #AppInstIdDeletionSubscriptionInfo - + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.4.3.2 + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.10.2-1 #AppInstSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.15.2-1 #AppLcmOpOccSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.26.2-1 #AppInstIdCreationSubscriptionInfo + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.29.2-1 #AppInstIdDeletionSubscriptionInfo + [Setup] Send a request for deleting a subscription ${NOT_EXISTING_SUBSCRIPTION_ID} Send a request for retrieving a subscription ${NOT_EXISTING_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 @@ -303,41 +334,53 @@ TC_MEC_MEC010p2_MEX_LCM_012_NF TC_MEC_MEC010p2_MEX_LCM_013_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_013_OK ... Check that MEC API provider service delete an existing LCM Subscription when requested - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.3.3.4 - Send a request for deleting a subscription ${SUBSCRIPTION_ID} + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.3.3.4 + [Setup] Send a request for a subscription AppInstSubscriptionRequest + Set Test Variable ${SUB_ID} ${response['body']['id']} + + Send a request for deleting a subscription ${SUB_ID} Check HTTP Response Status Code Is 204 TC_MEC_MEC010p2_MEX_LCM_013_NF [Documentation] TP_MEC_MEC010p2_MEX_LCM_013_NF ... Check that MEC API provider service sends an error when it receives a deletion request for a not existing LCM Subscription - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.3.3.4 + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.3.3.4 + [Setup] Send a request for deleting a subscription ${NOT_EXISTING_SUBSCRIPTION_ID} + Send a request for deleting a subscription ${NOT_EXISTING_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 + TC_MEC_MEC010p2_MEX_LCM_014_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_014_OK ... Check that MEC API provider service cancels an on going LCM Operation - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.11.3.1", - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.32.2-1" #CancelMode - Cancel on going LCM Operation ${APP_LCM_OP_OCC_ID} CancelMode + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.11.3.1", + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.32.2-1" #CancelMode + [Setup] Create and Instantiate App Instance CreateAppInstanceRequest InstantiateAppRequest + Cancel on going LCM Operation ${APP_LCM_OP_OCCS_ID} CancelMode Check HTTP Response Status Code Is 202 + [TearDown] Delete APP Instance ${APP_ID} + TC_MEC_MEC010p2_MEX_LCM_014_BR [Documentation] TP_MEC_MEC010p2_MEX_LCM_014_BR ... Check that MEC API provider service fails to cancel an on going LCM Operation when it receives a malformed request - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.11.3.1", - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.32.2-1" #CancelMode - Cancel on going LCM Operation ${APP_LCM_OP_OCC_ID} CancelModeBadRequest + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.11.3.1", + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.32.2-1" #CancelMode + [Setup] Create and Instantiate App Instance CreateAppInstanceRequest InstantiateAppRequest + Cancel on going LCM Operation ${APP_LCM_OP_OCCS_ID} CancelModeBadRequest Check HTTP Response Status Code Is 400 + [TearDown] Delete APP Instance ${APP_ID} + TC_MEC_MEC010p2_MEX_LCM_014_NF [Documentation] TP_MEC_MEC010p2_MEX_LCM_014_NF ... Check that MEC API provider service fails to cancel an on going LCM Operation when it receives a request related to a not existing application LCM Operation - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.11.3.1", - ... ETSI GS MEC 010-2 2.2.1, table 6.2.2.32.2-1" #CancelMode + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.11.3.1", + ... ETSI GS MEC 010-2 3.1.1, table 6.2.2.32.2-1" #CancelMode Cancel on going LCM Operation ${NOT_EXISTING_APP_LCM_OP_OCC_ID} CancelMode Check HTTP Response Status Code Is 404 @@ -346,16 +389,18 @@ TC_MEC_MEC010p2_MEX_LCM_014_NF TC_MEC_MEC010p2_MEX_LCM_015_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_015_OK ... Check that MEC API provider service makes failed an on going LCM Operation - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.12.3.1 - Fail on going LCM Operation ${APP_LCM_OP_OCC_ID} + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.12.3.1 + [Setup] Create and Instantiate App Instance CreateAppInstanceRequest InstantiateAppRequest + Fail on going LCM Operation ${APP_LCM_OP_OCCS_ID} Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is AppLcmOpOcc + Validate Json AppLcmOpOcc.schema.json ${response}[body] + [TearDown] Delete APP Instance ${APP_ID} TC_MEC_MEC010p2_MEX_LCM_015_NF [Documentation] TP_MEC_MEC010p2_MEX_LCM_015_NF ... Check that MEC API provider service makes failed an on going LCM Operation - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.12.3.1 + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.12.3.1 Fail on going LCM Operation ${NOT_EXISTING_APP_LCM_OP_OCC_ID} Check HTTP Response Status Code Is 404 @@ -363,15 +408,17 @@ TC_MEC_MEC010p2_MEX_LCM_015_NF TC_MEC_MEC010p2_MEX_LCM_016_OK [Documentation] TP_MEC_MEC010p2_MEX_LCM_016_OK ... Check that MEC API provider service retries an on going LCM Operation - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.13.3.1 + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.13.3.1 + [Setup] Create and Instantiate App Instance CreateAppInstanceRequest InstantiateAppRequest Retry on going LCM Operation ${APP_LCM_OP_OCC_ID} - Check HTTP Response Status Code Is 200 + Check HTTP Response Status Code Is 202 + [TearDown] Delete APP Instance ${APP_ID} TC_MEC_MEC010p2_MEX_LCM_016_NF [Documentation] TP_MEC_MEC010p2_MEX_LCM_016_NF ... Check that MEC API provider service fails to retry an LCM Operation when it receives a request related to a not existing application LCM Operation - ... ETSI GS MEC 010-2 2.2.1, clause 7.4.13.3.1 + ... ETSI GS MEC 010-2 3.1.1, clause 7.4.13.3.1 Retry on going LCM Operation ${NOT_EXISTING_APP_LCM_OP_OCC_ID} Check HTTP Response Status Code Is 404 @@ -424,6 +471,15 @@ Delete APP Instance Set Suite Variable ${response} ${output} +Create and Instantiate App Instance + [Arguments] ${appInstanceFile} ${instantiatePayloadFile} + Create new App Instance ${appInstanceFile} + Set Suite Variable ${APP_ID} ${response['body']['id']} + Instantiate App Request ${response['body']['id']} ${instantiatePayloadFile} + ${elements} = Split String ${response['headers']['Location']} / + Set Suite Variable ${APP_LCM_OP_OCCS_ID} ${elements}[4] + + Instantiate App Request [Arguments] ${appInstanceId} ${content} diff --git a/MEC010p2/MEX/LCM/environment/variables.txt b/MEC010p2/MEX/LCM/environment/variables.txt index a82e2bb9ad0cdbbcd5957a008babca8a861afa56..4ee64a4aa7c7d4e2df0262d8e190fcf5b325b939 100644 --- a/MEC010p2/MEX/LCM/environment/variables.txt +++ b/MEC010p2/MEX/LCM/environment/variables.txt @@ -20,4 +20,8 @@ ${OPERATION_VALUE} DISABLE ${CALLBACK_URI} https://callback.uri/path ${SUB_TYPE} AppInstanceStateChangeSubscription ${SUBSCRIPTION_ID} 01234e2b-6e50-4f33-ab09-8bf05850890 -${NOT_EXISTING_SUBSCRIPTION_ID} NOT_EXISTING_SUBSCRIPTION_ID \ No newline at end of file +${NOT_EXISTING_SUBSCRIPTION_ID} NOT_EXISTING_SUBSCRIPTION_ID + +${REQ_SUBSCRIPTION_TYPE} +${REQ_CALLBACK_URI} +${SUB_ID} \ No newline at end of file diff --git a/MEC010p2/MEX/LCM/jsons/OperateAppRequest.json b/MEC010p2/MEX/LCM/jsons/OperateAppRequest.json index 472fae858503ec60f4089d2094646c0da0a67d3c..495279e956be7dbe9b7ccff956e02e6fc46d1bb6 100644 --- a/MEC010p2/MEX/LCM/jsons/OperateAppRequest.json +++ b/MEC010p2/MEX/LCM/jsons/OperateAppRequest.json @@ -1,3 +1,3 @@ { - "changeStateTo": "STARTED" + "changeStateTo": "STOPPED" } \ No newline at end of file diff --git a/MEC010p2/MEX/LCM/schemas/AppInstanceSubscriptionLinkList.schema.json b/MEC010p2/MEX/LCM/schemas/AppInstanceSubscriptionLinkList.schema.json index 57be3c7b50ea31409623f2390c4857c645ce754a..0b63e56dbb30208e7ff6d348a0d9a0a80c51bce4 100644 --- a/MEC010p2/MEX/LCM/schemas/AppInstanceSubscriptionLinkList.schema.json +++ b/MEC010p2/MEX/LCM/schemas/AppInstanceSubscriptionLinkList.schema.json @@ -35,7 +35,7 @@ "type": "object", "required": [ "href", - "subsctiptionType" + "subscriptionType" ], "properties": { "href": { @@ -43,7 +43,7 @@ "type": "string", "format": "uri" }, - "subsctiptionType": { + "subscriptionTypeType": { "description": "'Subscribed notification type'", "type": "string", "enum": [ diff --git a/MEC011/SRV/APPSAQ/PlatAppServices.robot b/MEC011/SRV/APPSAQ/PlatAppServices.robot index 37ccca300695945bff2e46fb81a2e06a06f0ac2f..2daddf98d7724f8f4cee85bdff92a02ed6d13822 100644 --- a/MEC011/SRV/APPSAQ/PlatAppServices.robot +++ b/MEC011/SRV/APPSAQ/PlatAppServices.robot @@ -10,44 +10,46 @@ Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false Default Tags TC_MEC_SRV_APPSAQ -*** Test Cases *** -TP_MEC_MEC011_SRV_APPSAQ_001_OK +*** Test Cases *** +TC_MEC_MEC011_SRV_APPSAQ_001_OK [Documentation] ... Check that the IUT responds with a list of available MEC services ... for a given application instance when queried by a MEC Application ... - ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.5", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.1.2.2", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.2.6.3.1" + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.5, + ... ETSI GS MEC 011 3.2.1, clause 8.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 8.2.6.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create new service ServiceInfo ${APP_INSTANCE_ID} Get a list of mecService of an application instance ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is ServiceInfoList + [TearDown] Remove individual service ${APP_INSTANCE_ID} ${SERVICE_ID} + - -TP_MEC_MEC011_SRV_APPSAQ_001_BR +TC_MEC_MEC011_SRV_APPSAQ_001_BR [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 011 3.2.1, clause 5.2.5", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.1.2.2", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.2.6.3.1" + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.5, + ... ETSI GS MEC 011 3.2.1, clause 8.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 8.2.6.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES # Wrong query parameter name should trigger an error response. Get a list of mecService of an application instance with parameters ${APP_INSTANCE_ID} ${INSTANCE_ID} ${FAKE_INSTANCE_ID_VALUE} Check HTTP Response Status Code Is 400 -TP_MEC_MEC011_SRV_APPSAQ_002_OK +TC_MEC_MEC011_SRV_APPSAQ_002_OK [Documentation] ... 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 3.2.1, clause 5.2.5", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.1.2.2", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.2.6.3.4" + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.5, + ... ETSI GS MEC 011 3.2.1, clause 8.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 8.2.6.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES Create new service ServiceInfo ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 201 @@ -57,133 +59,145 @@ TP_MEC_MEC011_SRV_APPSAQ_002_OK ##TODO add notification server -TP_MEC_MEC011_SRV_APPSAQ_002_BR +TC_MEC_MEC011_SRV_APPSAQ_002_BR [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 011 3.2.1, clause 5.2.5", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.1.2.2", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.2.6.3.4" + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.5, + ... ETSI GS MEC 011 3.2.1, clause 8.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 8.2.6.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES Create new service ServiceInfoError ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 400 -TP_MEC_MEC011_SRV_APPSAQ_002_NF +TC_MEC_MEC011_SRV_APPSAQ_002_NF [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 011 3.2.1, clause 5.2.5", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.1.2.2", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.2.6.3.4" + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.5, + ... ETSI GS MEC 011 3.2.1, clause 8.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 8.2.6.3.4 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Remove individual service ${NON_EXISTENT_APP_INSTANCE_ID} ${SERVICE_ID} Create new service ServiceInfo ${NON_EXISTENT_APP_INSTANCE_ID} Check HTTP Response Status Code Is 404 -TP_MEC_MEC011_SRV_APPSAQ_003_OK +TC_MEC_MEC011_SRV_APPSAQ_003_OK [Documentation] ... Check that the IUT responds with the information on a specific service ... for a given application instance when queried by a MEC Application ... - ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.5", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.1.2.2", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.2.7.3.1" + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.5, + ... ETSI GS MEC 011 3.2.1, clause 8.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 8.2.7.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create new service ServiceInfo ${APP_INSTANCE_ID} Get individual service ${APP_INSTANCE_ID} ${SERVICE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is ServiceInfo Check Response Contains ${response['body']} serInstanceId ${SERVICE_ID} + [TearDown] Remove individual service ${APP_INSTANCE_ID} ${SERVICE_ID} + - -TP_MEC_MEC011_SRV_APPSAQ_003_NF +TC_MEC_MEC011_SRV_APPSAQ_003_NF [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 011 3.2.1, clause 5.2.5", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.1.2.2", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.2.7.3.1" + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.5, + ... ETSI GS MEC 011 3.2.1, clause 8.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 8.2.7.3.1 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Remove individual service ${NON_EXISTENT_APP_INSTANCE_ID} ${SERVICE_ID} Get individual service ${APP_INSTANCE_ID} ${NON_EXISTENT_SERVICE_ID} Check HTTP Response Status Code Is 404 -TP_MEC_MEC011_SRV_APPSAQ_004_OK +TC_MEC_MEC011_SRV_APPSAQ_004_OK [Documentation] ... Check that the IUT updates a service information for a given ... application instance when commanded by a MEC Application ... - ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.4", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.1.2.2", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.2.7.3.2" + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.4, + ... ETSI GS MEC 011 3.2.1, clause 8.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 8.2.7.3.2 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create new service ServiceInfo ${APP_INSTANCE_ID} Update service ${APP_INSTANCE_ID} ${SERVICE_ID} ServiceInfoUpdated Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is ServiceInfo Check Response Contains ${response['body']} version ${SVC_NEW_VERSION} + [TearDown] Remove individual service ${APP_INSTANCE_ID} ${SERVICE_ID} -TP_MEC_MEC011_SRV_APPSAQ_004_BR +TC_MEC_MEC011_SRV_APPSAQ_004_BR [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 011 3.2.1, clause 5.2.4", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.1.2.2", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.2.7.3.2" + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.4, + ... ETSI GS MEC 011 3.2.1, clause 8.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 8.2.7.3.2 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create new service ServiceInfo ${APP_INSTANCE_ID} Update service ${APP_INSTANCE_ID} ${SERVICE_ID} ServiceInfoUpdatedError Check HTTP Response Status Code Is 400 + [TearDown] Remove individual service ${APP_INSTANCE_ID} ${SERVICE_ID} -TP_MEC_MEC011_SRV_APPSAQ_004_NF +TC_MEC_MEC011_SRV_APPSAQ_004_NF [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 011 3.2.1, clause 5.2.4", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.1.2.2", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.2.7.3.2" + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.4, + ... ETSI GS MEC 011 3.2.1, clause 8.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 8.2.7.3.2 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Remove individual service ${APP_INSTANCE_ID} ${NON_EXISTENT_SERVICE_ID} Update service ${APP_INSTANCE_ID} ${NON_EXISTENT_SERVICE_ID} ServiceInfoUpdated Check HTTP Response Status Code Is 404 - -TP_MEC_MEC011_SRV_APPSAQ_004_PF +TC_MEC_MEC011_SRV_APPSAQ_004_PF [Documentation] ... Check that the IUT responds with an error when ... a request sent by a MEC Application doesn't comply with a required condition ... - ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.4", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.1.2.2", - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.2.7.3.2" + ... Reference ETSI GS MEC 011 3.2.1, clause 5.2.4, + ... ETSI GS MEC 011 3.2.1, clause 8.1.2.2, + ... ETSI GS MEC 011 3.2.1, clause 8.2.7.3.2 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create new service ServiceInfo ${APP_INSTANCE_ID} Update service with etag ${APP_INSTANCE_ID} ${SERVICE_ID} ServiceInfoUpdated ${INVALID_ETAG} Check HTTP Response Status Code Is 412 + [TearDown] Remove individual service ${APP_INSTANCE_ID} ${SERVICE_ID} -TP_MEC_MEC011_SRV_APPSAQ_005_OK +TC_MEC_MEC011_SRV_APPSAQ_005_OK [Documentation] ... Check that the IUT executes the deletion of a service ... for a given application instance when requested by a MEC Application ... - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.2.7.3.5" + ... Reference ETSI GS MEC 011 3.2.1, clause 8.2.7.3.5 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create new service ServiceInfo ${APP_INSTANCE_ID} Remove individual service ${APP_INSTANCE_ID} ${SERVICE_ID} - Check HTTP Response Status Code Is 204 + Check HTTP Response Status Code Is 204 -TP_MEC_MEC011_SRV_APPSAQ_005_NF +TC_MEC_MEC011_SRV_APPSAQ_005_NF [Documentation] ... Check that the IUT responds with an error when ... a request for deletion of a unknown service is sent by a MEC Application ... - ... Reference "ETSI GS MEC 011 3.2.1, clause 8.2.7.3.5" + ... Reference ETSI GS MEC 011 3.2.1, clause 8.2.7.3.5 [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Remove individual service ${APP_INSTANCE_ID} ${NON_EXISTENT_SERVICE_ID} Remove individual service ${APP_INSTANCE_ID} ${NON_EXISTENT_SERVICE_ID} Check HTTP Response Status Code Is 404 @@ -266,3 +280,25 @@ Remove individual service ${output}= Output response Set Suite Variable ${response} ${output} + +# Check Plaform IUT notifies the MEC Application instances + # [Documentation] + # ... + + # [Arguments] ${instance_id} ${content} + + # TODO check how to send the message (isn't defined). Does it need to be tested as it's not defined? + + # // MEC 011, clause 6.4.2 + # the IUT entity sends a notification_message containing + # body containing + # notificationType set to "SerAvailabilityNotification", + # services containing + # serName set to SERVICE_NAME + # _links containing + # subscription set to MP1_SUBSCRIPTION_A + # ; + # ; + # ; + # ; + # to the MEC_APP_Subscriber entity diff --git a/MEC011/SRV/APPSUB/PlatAppSubscriptions.robot b/MEC011/SRV/APPSUB/PlatAppSubscriptions.robot index 9ba023868799916963c684fcafbc097ee01fb4f9..4a2edb7f2d4bd7a5ed15c2f81193eb5adc080cdc 100644 --- a/MEC011/SRV/APPSUB/PlatAppSubscriptions.robot +++ b/MEC011/SRV/APPSUB/PlatAppSubscriptions.robot @@ -7,13 +7,13 @@ Resource ../../../GenericKeywords.robot Resource environment/variables.txt Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false Library OperatingSystem - +Library String Default Tags TC_MEC_SRV_APPSUB *** Test Cases *** -TP_MEC_MEC011_SRV_APPSUB_001_OK +TC_MEC_MEC011_SRV_APPSUB_001_OK [Documentation] ... Check that the IUT responds with a list of subscriptions for notifications ... on services availability when queried by a MEC Application @@ -21,12 +21,16 @@ TP_MEC_MEC011_SRV_APPSUB_001_OK ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", ... "ETSI GS MEC 011 3.2.1, clause 7.2.3.3.1" [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create new subscription ${APP_INSTANCE_ID} AppTerminationNotificationSubscription + ${elements} = Split String ${response['body']['_links']['self']['href']} / + Set Suite Variable ${SUB_ID} ${elements[3]} Get Subscriptions list ${APP_INSTANCE_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SubscriptionsLinkList + [TearDown] Remove subscription ${APP_INSTANCE_ID} ${SUB_ID} + - -TP_MEC_MEC011_SRV_APPSUB_001_NF +TC_MEC_MEC011_SRV_APPSUB_001_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -34,11 +38,12 @@ TP_MEC_MEC011_SRV_APPSUB_001_NF ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", ... "ETSI GS MEC 011 3.2.1, clause 7.2.3.3.1" [Tags] PIC_MEC_PLAT PIC_SERVICES + [TearDown] Remove subscription ${NON_EXISTENT_APP_INSTANCE_ID} ${SUB_ID} Get Subscriptions list ${NON_EXISTENT_APP_INSTANCE_ID} Check HTTP Response Status Code Is 404 -TP_MEC_MEC011_SRV_APPSUB_002_OK +TC_MEC_MEC011_SRV_APPSUB_002_OK [Documentation] ... Check that the IUT acknowledges the subscription by a MEC Application ... to notifications on service availability events @@ -47,14 +52,18 @@ TP_MEC_MEC011_SRV_APPSUB_002_OK ... "ETSI GS MEC 011 3.2.1, clause 7.2.3.3.4" [Tags] PIC_MEC_PLAT PIC_SERVICES Create new subscription ${APP_INSTANCE_ID} AppTerminationNotificationSubscription + ${elements} = Split String ${response['body']['_links']['self']['href']} / + Set Suite Variable ${SUB_ID} ${elements[3]} + Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is AppTerminationNotificationSubscription Check HTTP Response Header Contains Location Check Response Contains ${response['body']} subscriptionType AppTerminationNotificationSubscription Check Response Contains ${response['body']} callbackReference ${APP_TERM_NOTIF_CALLBACK_URI} + [TearDown] Remove subscription ${APP_INSTANCE_ID} ${SUB_ID} -TP_MEC_MEC011_SRV_APPSUB_002_BR +TC_MEC_MEC011_SRV_APPSUB_002_BR [Documentation] ... Check that the IUT responds with the information on a specific subscription ... when queried by a MEC Application @@ -66,7 +75,7 @@ TP_MEC_MEC011_SRV_APPSUB_002_BR Check HTTP Response Status Code Is 400 -TP_MEC_MEC011_SRV_APPSUB_003_OK +TC_MEC_MEC011_SRV_APPSUB_003_OK [Documentation] ... Check that the IUT responds with the information on a specific subscription ... when queried by a MEC Application @@ -74,12 +83,16 @@ TP_MEC_MEC011_SRV_APPSUB_003_OK ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", ... "ETSI GS MEC 011 3.2.1, clause 7.2.4.3.1" [Tags] PIC_MEC_PLAT PIC_SERVICES - Get individual subscription ${APP_INSTANCE_ID} ${SUBSCRIPTION_ID} + [Setup] Create new subscription ${APP_INSTANCE_ID} AppTerminationNotificationSubscription + ${elements} = Split String ${response['body']['_links']['self']['href']} / + Set Suite Variable ${SUB_ID} ${elements[3]} + Get individual subscription ${APP_INSTANCE_ID} ${SUB_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is AppTerminationNotificationSubscription + [TearDown] Remove subscription ${APP_INSTANCE_ID} ${SUB_ID} -TP_MEC_MEC011_SRV_APPSUB_003_NF +TC_MEC_MEC011_SRV_APPSUB_003_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -87,11 +100,12 @@ TP_MEC_MEC011_SRV_APPSUB_003_NF ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", ... "ETSI GS MEC 011 3.2.1, clause 7.2.4.3.1" [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Remove subscription ${APP_INSTANCE_ID} ${NON_EXISTENT_SUBSCRIPTION_ID} Get individual subscription ${APP_INSTANCE_ID} ${NON_EXISTENT_SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 -TP_MEC_MEC011_SRV_APPSUB_004_OK +TC_MEC_MEC011_SRV_APPSUB_004_OK [Documentation] ... Check that the IUT acknowledges the unsubscribe from service availability event notifications ... when commanded by a MEC Application @@ -99,11 +113,12 @@ TP_MEC_MEC011_SRV_APPSUB_004_OK ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", ... "ETSI GS MEC 011 3.2.1, clause 7.2.4.3.5" [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Create new subscription ${APP_INSTANCE_ID} AppTerminationNotificationSubscription Remove subscription ${APP_INSTANCE_ID} ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 204 -TP_MEC_MEC011_SRV_APPSUB_004_NF +TC_MEC_MEC011_SRV_APPSUB_004_NF [Documentation] ... Check that the IUT responds with an error when ... a request for an unknown URI is sent by a MEC Application @@ -111,6 +126,7 @@ TP_MEC_MEC011_SRV_APPSUB_004_NF ... Reference "ETSI GS MEC 011 3.2.1, clause 5.2.6", ... "ETSI GS MEC 011 3.2.1, clause 7.2.4.3.5" [Tags] PIC_MEC_PLAT PIC_SERVICES + [Setup] Remove subscription ${NON_EXISTENT_APP_INSTANCE_ID} ${SUBSCRIPTION_ID} Remove subscription ${NON_EXISTENT_APP_INSTANCE_ID} ${SUBSCRIPTION_ID} Check HTTP Response Status Code Is 404 @@ -137,6 +153,7 @@ Create new subscription ${output}= Output response Set Suite Variable ${response} ${output} + Get individual subscription [Arguments] ${appInstanceId} ${subscriptionId} diff --git a/MEC040/SRV/FederationEnablement.robot b/MEC040/SRV/FederationEnablement.robot index d59c956efed24f475dbaee79f67763d8e9bace27..ba14e44c3abe6afb76310a77ca01e31ffae524dd 100644 --- a/MEC040/SRV/FederationEnablement.robot +++ b/MEC040/SRV/FederationEnablement.robot @@ -1,6 +1,5 @@ Y''[Documentation] robot --outputdir ../../../outputs ./FederationEnablement.robot ... Test Suite to validate the Federation Enablement API (FED) operations. - *** Settings *** Resource environment/variables.txt Resource ../../pics.txt @@ -8,24 +7,33 @@ Resource ../../GenericKeywords.robot Library REST ${SCHEMA}://${HOST}:${PORT} ssl_verify=false Library OperatingSystem + +Test Setup Test Setup ${SYSTEM_ID_PLACEHOLDER} SystemInfo ${NO_ACTION} +Test Teardown Test TearDown ${SYSTEM_ID_PLACEHOLDER} SystemInfo ${NO_ACTION} + + *** Test Cases *** -TP_MEC_MEC040_SRV_MEF_001_OK +TC_MEC_MEC040_SRV_MEF_001_OK [Documentation] ... Check that the IUT responds with a list of all available systemInfo ... when requested by a MEC Orchestrator - No query parameters ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + [Setup] Test Setup ${None} SystemInfo ${REGISTER_ACTION} Retrieve all system info resources Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SystemInfoList + [Teardown] Test TearDown ${setup_response['body']['systemId']} ${None} ${REMOVE_ACTION} + -TP_MEC_MEC040_SRV_MEF_001_OK_02 +TC_MEC_MEC040_SRV_MEF_001_OK_02 [Documentation] ... Check that the IUT responds with a selection of all available systemInfo ... when requested by a MEC Orchestrator - SystemId query parameters ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + #SystemId cannot be set by the requestor, so Test setup and test tear down are not applicable Retrieve all system info resources with query params ${SYSTEM_ID_QUERY_PARAM} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SystemInfoList @@ -33,137 +41,169 @@ TP_MEC_MEC040_SRV_MEF_001_OK_02 Should Be Equal As Strings ${element}[systemId] ${EXPECTED_SYSTEM_ID} END -TP_MEC_MEC040_SRV_MEF_001_OK_03 +TC_MEC_MEC040_SRV_MEF_001_OK_03 [Documentation] ... Check that the IUT responds with a selection of all available systemInfo ... when requested by a MEC Orchestrator - Multiple SystemId query parameters ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + #SystemId cannot be set by the requestor, so Test setup and test tear down are not applicable Retrieve all system info resources with query params ${MULTIPLE_SYSTEM_ID_QUERY_PARAM} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SystemInfoList FOR ${element} IN @{response['body']} IF '''${element}[systemId]''' == '''${EXPECTED_SYSTEM_ID}''' - ${item} Set Variable ${TRUE} + ${found_first_system_id} Set Variable ${TRUE} END IF '''${element}[systemId]''' == '''${EXPECTED_SYSTEM_ID2}''' - ${item2} Set Variable ${TRUE} + ${found_second_system_id} Set Variable ${TRUE} END END - Should Be True ${item} - Should Be True ${item2} + Should Be True ${found_first_system_id} + Should Be True ${found_second_system_id} -TP_MEC_MEC040_SRV_MEF_001_OK_04 +TC_MEC_MEC040_SRV_MEF_001_OK_04 [Documentation] ... Check that the IUT responds with a selection of all available systemInfo ... when requested by a MEC Orchestrator - Empty SystemId query parameters ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + [Setup] Test Setup ${None} SystemInfo ${REGISTER_ACTION} Retrieve all system info resources Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SystemInfoList + [Teardown] Test TearDown ${setup_response['body']['systemId']} ${None} ${REMOVE_ACTION} + -TP_MEC_MEC040_SRV_MEF_001_OK_05 +TC_MEC_MEC040_SRV_MEF_001_OK_05 [Documentation] ... Check that the IUT responds with a selection of all available systemInfo ... when requested by a MEC Orchestrator - SystemName query parameters ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + [Setup] Test Setup ${None} SystemInfo ${REGISTER_ACTION} + ${SYSTEM_NAME_VALUE} Get value entry from JSON file SystemInfo systemName + Retrieve all system info resources with query params ${SYSTEM_NAME_QUERY_PARAM} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SystemInfoList FOR ${element} IN @{response['body']} - Should Be Equal As Strings ${element}[systemName] ${EXPECTED_SYSTEM_NAME} + Should Be Equal As Strings ${element}[systemName] ${SYSTEM_NAME_VALUE} END + [Teardown] Test TearDown ${setup_response['body']['systemId']} ${None} ${REMOVE_ACTION} + -TP_MEC_MEC040_SRV_MEF_001_OK_06 +TC_MEC_MEC040_SRV_MEF_001_OK_06 [Documentation] ... Check that the IUT responds with a selection of all available systemInfo ... when requested by a MEC Orchestrator - Multiple SystemName query parameters ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + [Setup] Test Setup ${None} SystemInfo ${REGISTER_ACTION} + ${SYSTEM_NAME_VALUE} Get value entry from JSON file SystemInfo systemName + Retrieve all system info resources with query params ${MUTIPLE_SYSTEM_NAME_QUERY_PARAM} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SystemInfoList FOR ${element} IN @{response['body']} - IF '''${element}[systemName]''' == '''${EXPECTED_SYSTEM_NAME}''' - ${item} Set Variable ${TRUE} + IF '''${element}[systemName]''' == '''${SYSTEM_NAME_VALUE}''' + ${found_sys_name_one} Set Variable ${TRUE} END IF '''${element}[systemName]''' == '''${EXPECTED_SYSTEM_NAME2}''' - ${item2} Set Variable ${TRUE} + ${found_sys_name_two} Set Variable ${TRUE} END END - Should Be True ${item} - Should Be True ${item2} + Should Be True ${found_sys_name_one} + Should Be True ${found_sys_name_two} + [Teardown] Test TearDown ${setup_response['body']['systemId']} ${None} ${REMOVE_ACTION} -TP_MEC_MEC040_SRV_MEF_001_OK_07 + +TC_MEC_MEC040_SRV_MEF_001_OK_07 [Documentation] ... Check that the IUT responds with a selection of all available systemInfo ... when requested by a MEC Orchestrator - Empty SystemName query parameters ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + [Setup] Test Setup ${None} SystemInfo ${REGISTER_ACTION} + Retrieve all system info resources with query params ${EMPTY_SYSTEM_NAME_QUERY_PARAM} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SystemInfoList - FOR ${element} IN @{response['body']} - Should Be Equal As Strings ${element}[systemName] ${EMPTY} - END + [Teardown] Test TearDown ${setup_response['body']['systemId']} ${None} ${REMOVE_ACTION} + -TP_MEC_MEC040_SRV_MEF_001_OK_08 +TC_MEC_MEC040_SRV_MEF_001_OK_08 [Documentation] ... Check that the IUT responds with a selection of all available systemInfo ... when requested by a MEC Orchestrator - systemProvider query parameters ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + [Setup] Test Setup ${None} SystemInfo ${REGISTER_ACTION} + ${SYS_PROVIDER_VALUE} Get value entry from JSON file SystemInfo systemProvider + Retrieve all system info resources with query params ${SYSTEM_PROVIDER_QUERY_PARAM} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SystemInfoList FOR ${element} IN @{response['body']} - Should Be Equal As Strings ${element}[systemProvider] ${EXPECTED_SYSTEM_PROVIDER} - END + Should Be Equal As Strings ${element}[systemProvider] ${SYS_PROVIDER_VALUE} + END + [Teardown] Test TearDown ${setup_response['body']['systemId']} ${None} ${REMOVE_ACTION} + -TP_MEC_MEC040_SRV_MEF_001_OK_09 +TC_MEC_MEC040_SRV_MEF_001_OK_09 [Documentation] ... Check that the IUT responds with a selection of all available systemInfo ... when requested by a MEC Orchestrator - Multiple systemProvider query parameters ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + ##TODO complete Retrieve all system info resources with query params ${MUTIPLE_SYS_PROVIDER_QUERY_PAR} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SystemInfoList + [Setup] Test Setup ${None} SystemInfo ${REGISTER_ACTION} + ${SYS_PROVIDER_VALUE} Get value entry from JSON file SystemInfo systemProvider + FOR ${element} IN @{response['body']} - IF '''${element}[systemProvider]''' == '''${EXPECTED_SYSTEM_PROVIDER}''' - ${item} Set Variable ${TRUE} + IF '''${element}[systemProvider]''' == '''${SYS_PROVIDER_VALUE}''' + ${sys_provider_found} Set Variable ${TRUE} END IF '''${element}[systemProvider]''' == '''${EXPECTED_SYSTEM_PROVIDER2}''' - ${item2} Set Variable ${TRUE} + ${sys_provider2_found} Set Variable ${TRUE} END END - Should Be True ${item} - Should Be True ${item2} + Should Be True ${sys_provider_found} + Should Be True ${sys_provider2_found} + [Teardown] Test TearDown ${setup_response['body']['systemId']} ${None} ${REMOVE_ACTION} + -TP_MEC_MEC040_SRV_MEF_001_OK_10 +TC_MEC_MEC040_SRV_MEF_001_OK_10 [Documentation] ... Check that the IUT responds with a selection of all available systemInfo ... when requested by a MEC Orchestrator - Empty systemProvider query parameters ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + [Setup] Test Setup ${None} SystemInfoEmptySystemProvider ${REGISTER_ACTION} Retrieve all system info resources with query params ${EMPTY_SYSTEM_PROVIDER_QUERY_PARAM} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SystemInfoList FOR ${element} IN @{response['body']} Should Be Equal As Strings ${element}[systemProvider] ${EMPTY} END + [Teardown] Test TearDown ${setup_response['body']['systemId']} ${None} ${REMOVE_ACTION} + -TP_MEC_MEC040_SRV_MEF_001_OK_11 +TC_MEC_MEC040_SRV_MEF_001_OK_11 [Documentation] ... Check that the IUT responds with a selection of all available systemInfo ... when requested by a MEC Orchestrator - Multiple query parameters ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + [Setup] Test Setup ${None} SystemInfo ${REGISTER_ACTION} + ${SYS_NAME_VALUE} Get value entry from JSON file SystemInfo systemName + Retrieve all system info resources with query params ${FILTER_ON_SYSTEM_ID_AND_NAME} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SystemInfoList @@ -173,20 +213,23 @@ TP_MEC_MEC040_SRV_MEF_001_OK_11 IF '''${element}[systemId]''' == '''${EXPECTED_SYSTEM_ID}''' ${counterSystemId}= set variable ${counterSystemId+1} END - IF '''${element}[systemId]''' == '''${EXPECTED_SYSTEM_ID}''' + IF '''${element}[systemName]''' == '''${SYS_NAME_VALUE}''' ${counterSystemName}= set variable ${counterSystemName+1} END ${counterSystemName}= set variable ${counterSystemName+1} END Should Be True '${counterSystemName}'>'0' Should Be True '${counterSystemId}'>'0' + [Teardown] Test TearDown ${setup_response['body']['systemId']} ${None} ${REMOVE_ACTION} + -TP_MEC_MEC040_SRV_MEF_001_NF_01 +TC_MEC_MEC040_SRV_MEF_001_NF_01 [Documentation] ... Check that the IUT responds with an error ... when selection is not applicable - SystemId ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + [Setup] Test Setup ${NOT_EXT_SYSTEM_ID_QUERY_PARAM} ${None} ${REMOVE_ACTION} Retrieve all system info resources with query params ${NOT_EXT_SYSTEM_ID_QUERY_PARAM} Check HTTP Response Status Code Is 404 @@ -196,21 +239,23 @@ TP_MEC_MEC040_SRV_MEF_001_NF_02 ... when selection is not applicable - SystemName ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + ##Test setup not applicable because systemInfo cannot be deleted by systemName Retrieve all system info resources with query params ${NOT_EXT_SYSTEM_NAME_QUERY_PARAM} Check HTTP Response Status Code Is 404 -TP_MEC_MEC040_SRV_MEF_001_NF_03 +TC_MEC_MEC040_SRV_MEF_001_NF_03 [Documentation] ... Check that the IUT responds with an error ... when selection is not applicable - SystemProvider ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + ##Test setup not applicable because systemInfo cannot be deleted by systemProvider Retrieve all system info resources with query params ${NOT_EXT_SYS_PROVIDER_QUERY_PARAM} Check HTTP Response Status Code Is 404 ##TODO double check -TP_MEC_MEC040_SRV_MEF_001_BR +TC_MEC_MEC040_SRV_MEF_001_BR [Documentation] ... Check that the IUT responds with an error when request is malformed ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.1, clause 5.2.2.2 @@ -218,17 +263,26 @@ TP_MEC_MEC040_SRV_MEF_001_BR Retrieve all system info resources wrong URL #Check HTTP Response Status Code Is 400 -TP_MEC_MEC040_SRV_MEF_002_OK +TC_MEC_MEC040_SRV_MEF_002_OK [Documentation] ... Check that the IUT creates a new systemInfo when requested by a MEC Orchestrator ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.4, clause 5.2.2.1.1 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + ##No test setup needed because the systemId is generated by IUT Register System Info SystemInfo Check HTTP Response Status Code Is 201 - Check HTTP Response Body Json Schema Is SystemInfo + Check HTTP Response Body Json Schema Is SystemInfo + ${SYS_NAME_VALUE} Get value entry from JSON file SystemInfo systemName + ${SYS_NAME_PROVIDER} Get value entry from JSON file SystemInfo systemProvider + + Should Be Equal As Strings ${response['body']['systemName']} ${SYS_NAME_VALUE} + Should Be Equal As Strings ${response['body']['systemProvider']} ${SYS_NAME_PROVIDER} + + [Teardown] Test TearDown ${response['body']['systemId']} ${None} ${REMOVE_ACTION} + -TP_MEC_MEC040_SRV_MEF_002_BR_01 +TC_MEC_MEC040_SRV_MEF_002_BR_01 [Documentation] ... Check that the IUT responds with an error on creating an existing systemInfo ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.4, clause 5.2.2.1.1 @@ -238,7 +292,7 @@ TP_MEC_MEC040_SRV_MEF_002_BR_01 ##TODO double check -TP_MEC_MEC040_SRV_MEF_002_BR_02 +TC_MEC_MEC040_SRV_MEF_002_BR_02 [Documentation] ... Check that the IUT responds with an error on providing inconsistent data ... ETSI GS MEC 040 V3.1.1, clause 7.3.3.4, clause 5.2.2.1.1 @@ -246,27 +300,29 @@ TP_MEC_MEC040_SRV_MEF_002_BR_02 Register System Info SystemInfoBR Check HTTP Response Status Code Is 400 -TP_MEC_MEC040_SRV_MEF_003_OK +TC_MEC_MEC040_SRV_MEF_003_OK [Documentation] ... Check that the IUT responds with a selection of all available systemInfo ... when requested by a MEC Orchestrator ... ETSI GS MEC 040 V3.1.1, clause 7.4.3.1, clause 5.2.2.1.1 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + ## No test setup and teardown applicable because systemId is generated by IUT Retrieve specific system info resource ${EXPECTED_SYSTEM_ID} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is SystemInfo -TP_MEC_MEC040_SRV_MEF_003_NF +TC_MEC_MEC040_SRV_MEF_003_NF [Documentation] ... Check that the IUT responds with an error ... when it receives a request for returning a systemInfo referred with a wrong systemId ... ETSI GS MEC 040 V3.1.1, clause 7.4.3.1, clause 5.2.2.1.1 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + [Setup] Test Setup ${NOT_EXISTING_SYSTEM_ID} ${None} ${REMOVE_ACTION} Retrieve specific system info resource ${NOT_EXISTING_SYSTEM_ID} Check HTTP Response Status Code Is 404 ##TODO double check -TP_MEC_MEC040_SRV_MEF_003_BR +TC_MEC_MEC040_SRV_MEF_003_BR [Documentation] ... Check that the IUT responds with an error ... when it receives a request for returning a systemInfo referred with a wrong systemId @@ -275,44 +331,60 @@ TP_MEC_MEC040_SRV_MEF_003_BR Retrieve specific system info resource ${NOT_EXISTING_SYSTEM_ID} #Check HTTP Response Status Code Is 400 -TP_MEC_MEC040_SRV_MEF_004_OK_01 +TC_MEC_MEC040_SRV_MEF_004_OK_01 [Documentation] ... Check that the IUT updates the systemInfo when requested by a MEC Orchestrator ... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.3, clause 5.2.2.1.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf - Update specific system info resource ${EXPECTED_SYSTEM_ID} SystemInfoUpdate + [Setup] Test Setup ${None} SystemInfo ${REGISTER_ACTION} + ${SYS_PROVIDER} Get value entry from JSON file SystemInfoUpdate endpoint + Update specific system info resource ${setup_response['body']['systemId']} SystemInfoUpdate Check HTTP Response Status Code Is 200 - Should Be Equal As Strings ${response['body']['systemProvider']} ${EXPECTED_NEW_SYSTEM_PROVIDER} + Should Be Equal As Strings ${response['body']['systemProvider']} ${SYS_PROVIDER} + [Teardown] Test TearDown ${setup_response['body']['systemId']} ${None} ${REMOVE_ACTION} + -TP_MEC_MEC040_SRV_MEF_004_OK_02 +TC_MEC_MEC040_SRV_MEF_004_OK_02 [Documentation] ... Check that the IUT updates the systemInfo when requested by a MEC Orchestrator ... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.3, clause 5.2.2.1.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf - Update specific system info resource ${EXPECTED_SYSTEM_ID} SystemInfoUpdate2 + [Setup] Test Setup ${None} SystemInfo ${REGISTER_ACTION} + Update specific system info resource ${setup_response['body']['systemId']} SystemInfoUpdate2 + ${SYS_NAME} Get value entry from JSON file SystemInfoUpdate2 systemName Check HTTP Response Status Code Is 200 - Should Be Equal As Strings ${response['body']['systemName']} ${EXPECTED_NEW_SYSTEM_NAME} + Should Be Equal As Strings ${response['body']['systemName']} ${SYS_NAME} + [Teardown] Test TearDown ${setup_response['body']['systemId']} ${None} ${REMOVE_ACTION} + + -TP_MEC_MEC040_SRV_MEF_004_OK_02 +TC_MEC_MEC040_SRV_MEF_004_OK_03 [Documentation] ... Check that the IUT updates the systemInfo when requested by a MEC Orchestrator ... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.3, clause 5.2.2.1.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf - Update specific system info resource ${EXPECTED_SYSTEM_ID} SystemInfoUpdate3 + [Setup] Test Setup ${None} SystemInfo ${REGISTER_ACTION} + Update specific system info resource ${setup_response['body']['systemId']} SystemInfoUpdate3 Check HTTP Response Status Code Is 200 - Should Be Equal As Strings ${response['body']['systemName']} ${EXPECTED_NEW_SYSTEM_NAME} - Should Be Equal As Strings ${response['body']['systemProvider']} ${EXPECTED_NEW_SYSTEM_PROVIDER} + ${SYS_NAME} Get value entry from JSON file SystemInfoUpdate3 systemName + ${SYS_PROVIDER} Get value entry from JSON file SystemInfoUpdate3 endpoint + + Should Be Equal As Strings ${response['body']['systemName']} ${SYS_NAME} + Should Be Equal As Strings ${response['body']['systemProvider']} ${SYS_PROVIDER} + [Teardown] Test TearDown ${setup_response['body']['systemId']} ${None} ${REMOVE_ACTION} -TP_MEC_MEC040_SRV_MEF_004_NF + +TC_MEC_MEC040_SRV_MEF_004_NF [Documentation] ... Check that the IUT responds with an error when requested to update an unknown systemInfo ... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.3, clause 5.2.2.1.2 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + [Setup] Test Setup ${NOT_EXISTING_SYSTEM_ID} ${None} ${REMOVE_ACTION} Update specific system info resource ${NOT_EXISTING_SYSTEM_ID} SystemInfoUpdate3 Check HTTP Response Status Code Is 404 ##TODO double check the corresponding TP -#TP_MEC_MEC040_SRV_MEF_004_BR_01 +#TC_MEC_MEC040_SRV_MEF_004_BR_01 #[Documentation] #... Check that the IUT responds with an error when requested to update with an inconsistant URI #... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.3, clause 5.2.2.1.2 @@ -320,7 +392,7 @@ TP_MEC_MEC040_SRV_MEF_004_NF #Update specific system info resource ${NOT_EXISTING_SYSTEM_ID} SystemInfoUpdate3 #Check HTTP Response Status Code Is 400 -TP_MEC_MEC040_SRV_MEF_004_BR_02 +TC_MEC_MEC040_SRV_MEF_004_BR_02 [Documentation] ... Check that the IUT responds with an error when requested to update with no data provided ... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.3, clause 5.2.2.1.2 @@ -328,27 +400,62 @@ TP_MEC_MEC040_SRV_MEF_004_BR_02 Update specific system info resource ${EXPECTED_SYSTEM_ID} SystemInfoUpdateBR Check HTTP Response Status Code Is 400 -TP_MEC_MEC040_SRV_MEF_005_OK +TC_MEC_MEC040_SRV_MEF_005_OK [Documentation] ... Check that the IUT responds with an error when requested to delete an unknown systemInfo ... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.5, clause 5.2.2.1.3 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + [Setup] Test Setup ${None} SystemInfo ${REGISTER_ACTION} Remove specific system info resource ${EXPECTED_SYSTEM_ID} Check HTTP Response Status Code Is 204 -TP_MEC_MEC040_SRV_MEF_005_NF +TC_MEC_MEC040_SRV_MEF_005_NF [Documentation] ... Check that the IUT responds with an error when requested to delete an unknown systemInfo ... ETSI GS MEC 040 V3.1.1, clause clause 7.4.3.5, clause 5.2.2.1.3 ... https://www.etsi.org/deliver/etsi_gs/mec/001_099/040/03.01.01_60/gs_mec040v030101p.pdf + [Setup] Test Setup ${NOT_EXISTING_SYSTEM_ID} ${None} ${REMOVE_ACTION} Remove specific system info resource ${NOT_EXISTING_SYSTEM_ID} Check HTTP Response Status Code Is 404 -############################################################################ - - +############################################################################ *** Keywords *** +Test Setup + [Arguments] ${systemId} ${content} ${action} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + + IF '''${action}''' == '''${REGISTER_ACTION}''' + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + POST ${apiRoot}/${apiName}/${apiVersion}/fed_resources/system_info ${body} + ${output}= Output response + Set Suite Variable ${setup_response} ${output} + END + + IF '''${action}''' == '''${REMOVE_ACTION}''' + DELETE ${apiRoot}/${apiName}/${apiVersion}/fed_resources/system_info/${systemId} + END + +Test Teardown + [Arguments] ${systemId} ${content} ${action} + Set Headers {"Accept":"application/json"} + Set Headers {"Content-Type":"application/json"} + Set Headers {"Authorization":"${TOKEN}"} + + IF '''${action}''' == '''${REGISTER_ACTION}''' + ${file}= Catenate SEPARATOR= jsons/ ${content} .json + ${body}= Get File ${file} + POST ${apiRoot}/${apiName}/${apiVersion}/fed_resources/system_info ${body} + END + + IF '''${action}''' == '''${REMOVE_ACTION}''' + DELETE ${apiRoot}/${apiName}/${apiVersion}/fed_resources/system_info/${systemId} + END + + Retrieve all system info resources Should Be True ${PIC_MEC_PLAT} == 1 Should Be True ${PIC_SERVICES} == 1 diff --git a/MEC040/SRV/environment/variables.txt b/MEC040/SRV/environment/variables.txt index f445ea346f853c2d302b8547c722723833956cfe..8ac81d51a9ec07c2783ac53729289c441cebac8e 100644 --- a/MEC040/SRV/environment/variables.txt +++ b/MEC040/SRV/environment/variables.txt @@ -9,6 +9,13 @@ ${apiRoot} ${apiName} fed-enablement ${apiVersion} v1 +${REGISTER_ACTION} REGISTER +${REMOVE_ACTION} REMOVE +${NO_ACTION} NO_ACTION + + +${SYSTEM_ID_PLACEHOLDER} SYSTEM_ID_PLACEHOLDER + ${EXPECTED_SYSTEM_ID} SYSTEM_ID ${NOT_EXISTING_SYSTEM_ID} NOT_EXISTING_SYS_ID ${EXPECTED_SYSTEM_ID2} SYSTEM_ID2 diff --git a/MEC040/SRV/jsons/SystemInfo.json b/MEC040/SRV/jsons/SystemInfo.json index 6abc01c25491241b1a7e8c91e9d6a577362c0bb7..c56ee19f43ff9aae95d909bad05400b47c20f649 100644 --- a/MEC040/SRV/jsons/SystemInfo.json +++ b/MEC040/SRV/jsons/SystemInfo.json @@ -1,4 +1,4 @@ { - "systemName": "systemNamea", + "systemName": "systemName", "systemProvider": "systemProvider" } \ No newline at end of file diff --git a/MEC040/SRV/jsons/SystemInfo2.json b/MEC040/SRV/jsons/SystemInfo2.json new file mode 100644 index 0000000000000000000000000000000000000000..f4adc3035df0a1ddd21f38fa583b38437f86481e --- /dev/null +++ b/MEC040/SRV/jsons/SystemInfo2.json @@ -0,0 +1,4 @@ +{ + "systemName": "systemName2", + "systemProvider": "systemProvider2" +} \ No newline at end of file diff --git a/MEC040/SRV/jsons/SystemInfo3.json b/MEC040/SRV/jsons/SystemInfo3.json new file mode 100644 index 0000000000000000000000000000000000000000..6ab6257f61c3ab9c089b8f4adce9d90797cb6c31 --- /dev/null +++ b/MEC040/SRV/jsons/SystemInfo3.json @@ -0,0 +1,4 @@ +{ + "systemName": "systemName3", + "systemProvider": "systemProvider3" +} \ No newline at end of file diff --git a/MEC040/SRV/jsons/SystemInfoEmptySystemProvider.json b/MEC040/SRV/jsons/SystemInfoEmptySystemProvider.json new file mode 100644 index 0000000000000000000000000000000000000000..258706acd04fe6d694a6f175859156640e047362 --- /dev/null +++ b/MEC040/SRV/jsons/SystemInfoEmptySystemProvider.json @@ -0,0 +1,4 @@ +{ + "systemName": "systemName", + "systemProvider": "" +} \ No newline at end of file