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": [