diff --git a/code/Test_definitions/Edgecloud_LCM_Test.feature b/code/Test_definitions/Edgecloud_LCM_Test.feature deleted file mode 100644 index f839e556..00000000 --- a/code/Test_definitions/Edgecloud_LCM_Test.feature +++ /dev/null @@ -1,134 +0,0 @@ -#/*- ---license-start -#* CAMARA Project -#* --- -#* Copyright (C) 2022 - 2023 Contributors | Deutsche Telekom AG to CAMARA a Series of LF Projects, LLC -#* The contributor of this file confirms his sign-off for the -#* Developer Certificate of Origin (http://developercertificate.org). -#* --- -#* Licensed under the Apache License, Version 2.0 (the "License"); -#* you may not use this file except in compliance with the License. -#* You may obtain a copy of the License at -#* -#* http://www.apache.org/licenses/LICENSE-2.0 -#* -#* Unless required by applicable law or agreed to in writing, software -#* distributed under the License is distributed on an "AS IS" BASIS, -#* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -#* See the License for the specific language governing permissions and -#* limitations under the License. -#* ---license-end -#*/ - -@EdgeCloudLCM @EdgeCloudLCMSanity -Feature:Automated Edge Cloud API System Integration Test - - -@EdgeCloud_LCM_app_submission_ok -Scenario: Submit an Application with mandatory parameters -When invoking with the POST method to submit an app with all required parameters -Then response code is 201 - -@EdgeCloud_LCM_app_submission_conflict -Scenario: Submit an Application with mandatory parameters -Given an application with the same name and version had already been submitted -When invoking with the POST method to submit an app with all required parameters -Then response code is 409 - -@EdgeCloud_LCM_app_get_info_valid_parameter -Scenario: Get application info with mandatory parameter ("appId") -When invoking the GET method to obtain app information with mandatory parameter ("appId") -Then response code is 200 - -@EdgeCloud_LCM_app_get_info_invalid_parameter -Scenario: Get application info with mandatory parameter ("appId") -Given appId provided does not exist -When invoking the GET method to obtain submission app information with mandatory parameter ("appId") -Then response code is 404 - -@EdgeCloud_LCM_app_delete_valid_parameter -Scenario: Delete all the information and content related to an Application with mandatory parameter ("appId") -Given there are no running instances of the app -When invoking with the DELETE method to delete an app with just mandatory parameter ("appId") -Then response code is 202 -And the application information is deleted - -@EdgeCloud_LCM_app_delete_conflict -Scenario: Delete all the information and content related to an Application with mandatory parameter ("appId") -Given there are running instances of the app -When invoking with the DELETE method to delete an app with just mandatory parameter ("appId") -Then response code is 409 - -@EdgeCloud_LCM_app_delete_invalid_parameter -Scenario: Delete all the information and content related to an Application with mandatory parameter ("appId") -Given appId provided does not exist -When invoking with the DELETE method to delete an app with just mandatory parameter ("appId") -Then response code is 404 - -@EdgeCloud_LCM_app_instantiation_ok_mandatory_parameters -Scenario: Instantiate an Application with just mandatory parameters ("appId" in path, and "region" in body) -Given an application has already been submitted -When invoking with the POST method to instantiate an app with just mandatory parameters ("appId" in path, and "region" in body) -Then response code is 202 -And the process of instantiating the app starts in all available edge cloud zones in the region provided - -@EdgeCloud_LCM_app_instantiation_ok_optional_parameters -Scenario: Instantiate an Application with mandatory parameters ("appId" in path, and "region" in body) and optional parameter ("EdgeCloudZone") -Given an application has already been submitted -When invoking with the POST method to instantiate an app with mandatory parameters ("appId" in path, and "region" in body) and optional parameter ("EdgeCloudZone") -Then response code is 202 -And the process of instantiating the app starts only in given region and edge cloud zone - -@EdgeCloud_LCM_app_instantiation_conflict -Scenario: Instantiate an Application with mandatory parameters ("appId" in path, and "region" in body) and optional parameter ("EdgeCloudZone") -Given an application has already been submitted, but already instantiated in given EdgeCloudZone -When invoking with the POST method to instantiate an app with mandatory parameters ("appId" in path, and "region" in body) and optional parameter ("EdgeCloudZone") -Then response code is 409 - -@EdgeCloud_LCM_app_instance_get_info_valid_parameter -Scenario: Get application instance info with mandatory parameter ("appId") -When invoking the GET method to obtain information an app instance with mandatory parameter ("appId") -Then response code is 200 -And information of all existing app instances of given app is returned - -@EdgeCloud_LCM_app_instance_get_info_invalid_parameter -Scenario: Get application instance info with mandatory parameter ("appId") -Given appId provided does not exist -When invoking the GET method to obtain information an app instance with mandatory parameter ("appId") -Then response code is 404 - -@EdgeCloud_LCM_app_instance_delete_all_instances -Scenario: Delete all running instances of an application in Edge Cloud -When invoking with the DELETE method to terminate running instances of an application within Edge Cloud with just mandatory parameter ("appId") -Then response code is 202 -And all the application instances termination initiated - -@EdgeCloud_LCM_app_instance_delete_valid_parameter -Scenario: Delete a running instance of an application within an Edge Cloud Zone with optional parameter ("appInstanceId") -When invoking with the DELETE method to terminate a running instance of an application including optional parameter ("appInstanceId") and mandatory parameter ("appId") -Then response code is 202 -And the application instance termination initiated - - -@EdgeCloud_LCM_app_instance_delete_invalid_parameter -Scenario: Delete a running instance of an application within an Edge Cloud Zone with optional parameter ("appInstanceId") -Given appInstanceId provided does not exist -When invoking with the DELETE method to terminate a running instance of an application including optional parameter ("appInstanceId") and mandatory parameter ("appId") -Then response code is 404 - -@EdgeCloud_LCM_get_all_edge_cloud_zones_ok -Scenario: Get information of all existing Edge Cloud Zones -When invoking the GET method to obtain information of Edge Cloud Zones with no optional parameters -Then response code is 200 -And information of all existing edge cloud zones is returned - -@EdgeCloud_LCM_get_filtered_edge_cloud_zones_ok -Scenario: Get information of existing Edge Cloud Zones with optional parameters ("region","status") -When invoking the GET method to obtain information of Edge Cloud Zones with a region and a status (active,inactive,unknown) -Then response code is 200 -And only information of cloud zones in the region and with the current status given in the input is returned - -@EdgeCloud_LCM_get_filtered_edge_cloud_zones_nok -Scenario: Get information of existing Edge Cloud Zones with optional parameters ("region","status") -Given region provided does not exist -When invoking the GET method to obtain information of Edge Cloud Zones with a region and a status (active,inactive,unknown) -Then response code is 404 diff --git a/code/Test_definitions/edge-cloud-eam-createAppDeployment.feature b/code/Test_definitions/edge-cloud-eam-createAppDeployment.feature new file mode 100644 index 00000000..4b3ba8fb --- /dev/null +++ b/code/Test_definitions/edge-cloud-eam-createAppDeployment.feature @@ -0,0 +1,128 @@ +Feature: CAMARA Edge Application Management API, vwip - Operation createAppDeployment + # Input to be provided by the implementation to the tester + # + # Implementation indications: + # * apiRoot: API root of the server URL + # + # Testing assets: + # * An AppId of an application already submited by the operation submitApp + # * At least one edgeCloudZoneId available to deploy the application + # + + # References to OAS spec schemas refer to schemas specified in edge-application-management.yaml + + Background: Common createAppDeployment setup + Given an environment at "apiRoot" + And the resource "/edge-application-management/vwip/deployments" + And the header "Content-Type" is set to "application/json" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" + # Properties not explicitly overwritten in the Scenarios can take any values compliant with the schema + And the request body is set by default to a request body compliant with the schema at "/components/schemas/AppDeploymentManifest" + + # Success scenarios + + @EdgeCloud_EAM_createAppDeployment_01_generic_success_scenario + Scenario: Instantiate an Application with just mandatory parameters ("appDeploymentName", "appId" and "edgeCloudZoneId" in body) + Given an application has already been submitted by operation submitApp + And the request body property "$.appDeploymentName" is set to a valid name + And the request body property "$.appId" is set to a valid application ID + And the request body property "$.edgeCloudZoneId" is set to a valid edge zone id + When the request "createAppDeployment" is sent + Then response code is 202 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has the same value as the request header "x-correlator" + And the response body contains the "appDeploymentId" + And the process of instantiating the app starts in all available edge cloud zones in the region provided + + @EdgeCloud_EAM_createAppDeployment_02_success_scenario_optional_parameters + Scenario: Instantiate an Application with mandatory parameters ("appDeploymentName", "appId" and "edgeCloudZoneId" in body) and optional parameter ("KubernetesClusterRef") + Given an application has already been submitted by operation submitApp + And the request body property "$.appDeploymentName" is set to a valid name + And the request body property "$.appId" is set to a valid application ID + And the request body property "$.edgeCloudZoneId" is set to a valid edge zone id + And the request body property "$.KubernetesClusterRef" is set to a valid kubernetes cluster + When the request "createAppDeployment" is sent + Then response code is 202 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has the same value as the request header "x-correlator" + And the response body contains the "appDeploymentId" + And the process of instantiating the app starts only in given region and edge cloud zone + + + # Error scenarios + + #Error 409 + + @EdgeCloud_EAM_createAppDeployment_409.conflict + Scenario: Instantiate an existing application with mandatory parameters ("appDeploymentName", "appId" and "edgeCloudZoneId" in body) + Given there are running instances of the app + And the request body property "$.appDeploymentName" is set to a valid name + And the request body property "$.appId" is set to a valid application ID + And the request body property "$.edgeCloudZoneId" is set to a valid edge zone id + And Application instance with "$.name" and "$.appId" is already running in "$.edgeCloudZoneId" + When the request "createAppDeployment" is sent + Then response code is 409 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has the same value as the request header "x-correlator" + And the response property "$.code" is "CONFLICT" + And the response property "$.message" contains a user friendly text + + # Error 400 + + @EdgeCloud_eam_createAppDeployment_400.1_schema_not_compliant + Scenario: Invalid Argument. Generic Syntax Exception + Given the request body is set to any value which is not compliant with the schema at "/components/schemas/AppInstanceManifest" + When the request "createAppDeployment" is sent + Then the response status code is 400 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @EdgeCloud_eam_createAppDeployment_400.2_no_request_body + Scenario: Missing request body + Given the request body is not included + When the request "createAppDeployment" is sent + Then the response status code is 400 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @EdgeCloud_eam_createAppDeployment_400.3_empty_request_body + Scenario: Empty object as request body + Given the request body is set to {} + When the request "createAppDeployment" is sent + Then the response status code is 400 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @EdgeCloud_eam_createAppDeployment_400.4_empty_property + Scenario: Error response for empty property in request body + Given the request body property "" is set to {} + When the request "createAppDeployment" is sent + Then the response status code is 400 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + # Errors 403 + + @EdgeCloud_eam_createAppDeployment_403.1_missing_access_token_scope + Scenario: Missing access token scope + Given the header "Authorization" is set to an access token that does not include the required scope + When the request "createAppDeployment" is sent + Then the response status code is 403 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text \ No newline at end of file diff --git a/code/Test_definitions/edge-cloud-eam-createAppInstance.feature b/code/Test_definitions/edge-cloud-eam-createAppInstance.feature new file mode 100644 index 00000000..ec4c0172 --- /dev/null +++ b/code/Test_definitions/edge-cloud-eam-createAppInstance.feature @@ -0,0 +1,129 @@ +Feature: CAMARA Edge Application Management API, vwip - Operation createAppInstance + # Input to be provided by the implementation to the tester + # + # Implementation indications: + # * apiRoot: API root of the server URL + # + # Testing assets: + # * An AppId of an application already submited by the operation submitApp + # * An edgeCloudZoneId available to deploy the application + # + + # References to OAS spec schemas refer to schemas specified in edge-application-management.yaml + + Background: Common createAppInstance setup + Given an environment at "apiRoot" + And the resource "/edge-application-management/vwip/appinstances" + And the header "Content-Type" is set to "application/json" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" + # Properties not explicitly overwritten in the Scenarios can take any values compliant with the schema + And the request body is set by default to a request body compliant with the schema at "/components/schemas/AppInstanceManifest" + + # Success scenarios + + @EdgeCloud_EAM_createAppInstance_01_generic_success_scenario + Scenario: Instantiate an Application with just mandatory parameters ("name", "appId" and "edgeCloudZoneId" in body) + Given an application has already been submitted by operation submitApp + And the request body property "$.name" is set to a valid name + And the request body property "$.appId" is set to a valid application ID + And the request body property "$.edgeCloudZoneId" is set to a valid edge zone id + When the request "createApp" is sent + Then response code is 202 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has the same value as the request header "x-correlator" + And the response body complies with the OAS schema at "/components/schemas/AppInstanceInfo" + And the process of instantiating the app starts in all available edge cloud zones in the region provided + + @EdgeCloud_EAM_createAppInstance_02_success_scenario_optional_parameters + Scenario: Instantiate an Application with mandatory parameters ("name", "appId" and "edgeCloudZoneId" in body) and optional parameter ("KubernetesClusterRef") + Given an application has already been submitted by operation submitApp + And the request body property "$.name" is set to a valid name + And the request body property "$.appId" is set to a valid application ID + And the request body property "$.edgeCloudZoneId" is set to a valid edge zone id + And the request body property "$.KubernetesClusterRef" is set to a valid kubernetes cluster + When the request "createApp" is sent + Then response code is 202 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has the same value as the request header "x-correlator" + And the response body complies with the OAS schema at "/components/schemas/AppInstanceInfo" + And the process of instantiating the app starts only in given region and edge cloud zone + + + # Error scenarios + + #Error 409 + + @EdgeCloud_EAM_createAppInstance_409.conflict + Scenario: Instantiate an existing application with mandatory parameters ("name", "appId" and "edgeCloudZoneId" in body) + Given there are running instances of the app + And the request body property "$.name" is set to a valid name + And the request body property "$.appId" is set to a valid application ID + And the request body property "$.edgeCloudZoneId" is set to a valid edge zone id + And Application instance with "$.name" and "$.appId" is already running in "$.edgeCloudZoneId" + When the request "createApp" is sent + Then response code is 409 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has the same value as the request header "x-correlator" + And the response property "$.code" is "CONFLICT" + And the response property "$.message" contains a user friendly text + + # Error 400 + + @EdgeCloud_eam_createAppInstance_400.1_schema_not_compliant + Scenario: Invalid Argument. Generic Syntax Exception + Given the request body is set to any value which is not compliant with the schema at "/components/schemas/AppInstanceManifest" + When the request "createAppInstance" is sent + Then the response status code is 400 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @EdgeCloud_eam_createAppInstance_400.2_no_request_body + Scenario: Missing request body + Given the request body is not included + When the request "createAppInstance" is sent + Then the response status code is 400 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @EdgeCloud_eam_createAppInstance_400.3_empty_request_body + Scenario: Empty object as request body + Given the request body is set to {} + When the request "createAppInstance" is sent + Then the response status code is 400 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @EdgeCloud_eam_createAppInstance_400.4_empty_property + Scenario: Error response for empty property in request body + Given the request body property "" is set to {} + When the request "createAppInstance" is sent + Then the response status code is 400 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + # Errors 403 + + @EdgeCloud_eam_createAppInstance_403.1_missing_access_token_scope + Scenario: Missing access token scope + Given the header "Authorization" is set to an access token that does not include the required scope + When the request "createAppInstance" is sent + Then the response status code is 403 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text + \ No newline at end of file diff --git a/code/Test_definitions/edge-cloud-eam-deleteApp.feature b/code/Test_definitions/edge-cloud-eam-deleteApp.feature new file mode 100644 index 00000000..8ccc9231 --- /dev/null +++ b/code/Test_definitions/edge-cloud-eam-deleteApp.feature @@ -0,0 +1,71 @@ +Feature: CAMARA Edge Application Management API, vwip - Operation deleteApp + # Input to be provided by the implementation to the tester + # + # Implementation indications: + # * apiRoot: API root of the server URL + # + # Testing assets: + # * An appId of a submitted application and the values used in the submitApp operation. + # + + # References to OAS spec schemas refer to schemas specified in edge-application-management.yaml + + Background: Common deleteApp setup + Given an environment at "apiRoot" + And the resource "/edge-application-management/vwip/apps/{appId}" + And the header "Content-Type" is set to "application/json" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" + + + # Success scenarios + + @EdgeCloud_EAM_deleteApp_01_generic_success_scenario + Scenario: Delete all the information and content related to an Application with mandatory parameter ("appId") + Given there are no running instances of the app + And the path parameter "$.appId" is set to a valid application ID + When the request "deleteApp" is sent + Then response code is 202 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And the application information is deleted + + + # Errors + # Error 409 + @EdgeCloud_EAM_deleteApp_409.1_conflict + Scenario: Error response for deleting an application with a running instance + Given there is at least one running instance of the app + And the path parameter "$.appId" is set to a valid application ID + When the request "deleteApp" is sent + Then response code is 409 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 409 + And the response property "$.code" is "CONFLICT" + And the response property "$.message" contains a user friendly text + + # Error 404 + @EdgeCloud_EAM_deleteApp_404.1_invalid_parameter + Scenario: Error response for deleting a non-existing app + Given there are running instances of the app + And the path parameter "$.appId" is set to an invalid application ID + When the request "deleteApp" is sent + Then response code is 404 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 404 + And the response property "$.code" is "NOT_FOUND" + And the response property "$.message" contains a user friendly text + + # Errors 403 + @EdgeCloud_eam_deleteApp_403.1_missing_access_token_scope + Scenario: Missing access token scope + Given the header "Authorization" is set to an access token that does not include the required scope + When the request "deleteApp" is sent + Then the response status code is 403 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text \ No newline at end of file diff --git a/code/Test_definitions/edge-cloud-eam-deleteAppDeployment.feature b/code/Test_definitions/edge-cloud-eam-deleteAppDeployment.feature new file mode 100644 index 00000000..3bb781bd --- /dev/null +++ b/code/Test_definitions/edge-cloud-eam-deleteAppDeployment.feature @@ -0,0 +1,72 @@ +Feature: CAMARA Edge Application Management API, vwip - Operation deleteAppDeployment + # Input to be provided by the implementation to the tester + # + # Implementation indications: + # * apiRoot: API root of the server URL + # + # Testing assets: + # * An appId of a submitted application and the values used in the submitApp operation. + # * A deployment instantiated by createAppDeployment operation. + # + + # References to OAS spec schemas refer to schemas specified in edge-application-management.yaml + + Background: Common deleteAppDeployment setup + Given an environment at "apiRoot" + And the resource "/edge-application-management/vwip/deployment/{appDeploymentId}" + And the header "Content-Type" is set to "application/json" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" + + + # Success scenarios + + @EdgeCloud_EAM_deleteAppDeployment_01_generic_success_scenario_async + Scenario: Delete a running instance of an application within an Edge Cloud Zone with mandatory parameter ("appDeploymentId") + Given there are application instances running + And the request path parameter "$.appDeploymentIdd" is set to a valid application ID + When the request "deleteApp" is sent + Then response code is 202 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And the application instance termination initiated + + # Errors + + # Error 404 + + @EdgeCloud_EAM_deleteAppDeployment_404.1_invalid_parameter + Scenario: Delete a running instance of an application within an Edge Cloud Zone with mandatory, and non-existing, parameter ("appDeploymentId") + Given there are application instances running + And the path parameter "$.appDeploymentId" is set to an invalid application instance ID + When the request "deleteAppDeployment" is sent + Then response code is 404 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 404 + And the response property "$.code" is "NOT_FOUND" + And the response property "$.message" contains a user friendly text + + # Error 403 + @EdgeCloud_eam_deleteAppDeployment_403.1_missing_access_token_scope + Scenario: Missing access token scope + Given the header "Authorization" is set to an access token that does not include the required scope + When the request "deleteAppDeployment" is sent + Then the response status code is 403 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text + + # Error 410 + @EdgeCloud_eam_deleteAppDeployment_410.1_gone + Scenario: Delete an already removed deployment + Given the request path parameter "$.appDeploymentId" is set to an already removed Deployment ID + When the request "deleteAppDeployment" is sent + Then response code is 410 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 410 + And the response property "$.code" is "GONE" + And the response property "$.message" contains a user friendly text \ No newline at end of file diff --git a/code/Test_definitions/edge-cloud-eam-deleteAppInstance.feature b/code/Test_definitions/edge-cloud-eam-deleteAppInstance.feature new file mode 100644 index 00000000..0c53cc24 --- /dev/null +++ b/code/Test_definitions/edge-cloud-eam-deleteAppInstance.feature @@ -0,0 +1,70 @@ +Feature: CAMARA Edge Application Management API, vwip - Operation deleteAppInstance + # Input to be provided by the implementation to the tester + # + # Implementation indications: + # * apiRoot: API root of the server URL + # + # Testing assets: + # * An appId of a submitted application and the values used in the submitApp operation. + # * An Application instantiated by createAppInstance operation. + # + + # References to OAS spec schemas refer to schemas specified in edge-application-management.yaml + + Background: Common deleteAppInstance setup + Given an environment at "apiRoot" + And the resource "/edge-application-management/vwip/appinstances" + And the header "Content-Type" is set to "application/json" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" + + + # Success scenarios + + @EdgeCloud_EAM_deleteAppInstance_01_generic_success_scenario_async + Scenario: Delete a running instance of an application within an Edge Cloud Zone with mandatory parameter ("appInstanceId") + Given there are application instances running + And the request path parameter "$.appInstanceId" is set to a valid application ID + When the request "deleteApp" is sent + Then response code is 202 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And the application instance termination initiated + + @EdgeCloud_EAM_deleteAppInstance_02_generic_success_scenario_sync + Scenario: Delete a running instance of an application within an Edge Cloud Zone with mandatory parameter ("appInstanceId") + Given there are application instances running + And the request path parameter "$.appInstanceId" is set to a valid application ID + When the request "deleteApp" is sent + Then response code is 204 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And the application instance is deleted + + # Errors + + # Error 404 + + @EdgeCloud_EAM_deleteAppInstance_404.1_invalid_parameter + Scenario: Delete a running instance of an application within an Edge Cloud Zone with mandatory, and non-existing, parameter ("appInstanceId") + Given there are application instances running + And the path parameter "$.appInstanceId" is set to an invalid application instance ID + When the request "deleteAppInstance" is sent + Then response code is 404 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 404 + And the response property "$.code" is "NOT_FOUND" + And the response property "$.message" contains a user friendly text + + # Error 403 + @EdgeCloud_eam_deleteAppInstance_403.1_missing_access_token_scope + Scenario: Missing access token scope + Given the header "Authorization" is set to an access token that does not include the required scope + When the request "deleteAppInstance" is sent + Then the response status code is 403 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text \ No newline at end of file diff --git a/code/Test_definitions/edge-cloud-eam-getApp.feature b/code/Test_definitions/edge-cloud-eam-getApp.feature new file mode 100644 index 00000000..4d14279c --- /dev/null +++ b/code/Test_definitions/edge-cloud-eam-getApp.feature @@ -0,0 +1,68 @@ +Feature: CAMARA Edge Application Management API, vwip - Operation getApp + # Input to be provided by the implementation to the tester + # + # Implementation indications: + # * apiRoot: API root of the server URL + # + # Testing assets: + # * An appId of a submitted application and the values used in the submitApp operation. + # + + # References to OAS spec schemas refer to schemas specified in edge-application-management.yaml + + Background: Common getApp setup + Given an environment at "apiRoot" + And the resource "/edge-application-management/vwip/apps/{appId}" + And the header "Content-Type" is set to "application/json" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" + + + # Success scenarios + + @EdgeCloud_EAM_getApp_01_generic_success_scenario + Scenario: Get information of an existing application + Given there is an application submitted by operation submitApp + And the path parameter "$.appId" is set to a valid application ID + When the request "getApp" is sent + Then response code is 200 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response body complies with the OAS schema at "/components/schemas/AppManifest" + And the response property "$name" has the value provided for submitApp + And the response property "$appProvider" has the value provided for submitApp + And the response property "$version" has the value provided for submitApp + And the response property "$packageType" has the value provided for submitApp + And the response property "$appRepo" has the value provided for submitApp + And the response property "$requiredResources" has the value provided for submitApp + And the response property "$componentSpec" has the value provided for submitApp + And the response property "$operatingSystem" exists only if provided for submitApp and with the same value + + + # Errors + + # Error 404 + + @EdgeCloud_EAM_getApp_404.1_app_not_found + Scenario: appId of a non-existing application + Given the path parameter "appId" is set to a random UUID + When the request "getApp" is sent + Then response code is 404 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 404 + And the response property "$.code" is "NOT_FOUND" + And the response property "$.message" contains a user friendly text + + # Errors 403 + + @EdgeCloud_eam_getApp_403.1_missing_access_token_scope + Scenario: Missing access token scope + Given the header "Authorization" is set to an access token that does not include the required scope + When the request "getApp" is sent + Then the response status code is 403 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text \ No newline at end of file diff --git a/code/Test_definitions/edge-cloud-eam-getAppDeployments.feature b/code/Test_definitions/edge-cloud-eam-getAppDeployments.feature new file mode 100644 index 00000000..2ce07204 --- /dev/null +++ b/code/Test_definitions/edge-cloud-eam-getAppDeployments.feature @@ -0,0 +1,115 @@ +Feature: CAMARA Edge Application Management API, vwip - Operation getAppDeployments + # Input to be provided by the implementation to the tester + # + # Implementation indications: + # * apiRoot: API root of the server URL + # + # Testing assets: + # * An appId of a submitted application and the values used in the submitApp operation. + # * A deployment instantiated by createAppDeployment operation + + # References to OAS spec schemas refer to schemas specified in edge-application-management.yaml + + Background: Common getAppDeployments setup + Given an environment at "apiRoot" + And the resource "/edge-application-management/vwip/deployments" + And the header "Content-Type" is set to "application/json" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" + + + # Success scenarios + + + @EdgeCloud_EAM_getAppDeployments_01_generic_success_scenario + Scenario: Get information of all existing application deployments + Given there are application deployments created by operation createAppInstance + When the request "getAppDeployments" is sent + Then response code is 200 + And A list of existing app deployments is returned + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response body complies with the OAS schema at "/components/schemas/AppDeploymentInfo" + + @EdgeCloud_EAM_getAppDeployments_02_success_scenario_filtered_by_appId + Scenario: Get application deployments info with mandatory parameter ("appId") + Given there are application deployments created by operation createAppInstance + And the request path parameter "$.appId" is set to a valid application ID + When the request "getAppDeployments" is sent + Then response code is 200 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And information of all existing app deployments of given app is returned + And the response body complies with the OAS schema at "/components/schemas/AppDeploymentInfo" + + @EdgeCloud_EAM_getAppDeployments_03_success_scenario_filtered_by_appInstanceId + Scenario: Get application deployments info with mandatory parameter ("appInstanceId") + Given there are application deployments created by operation createAppInstance + And the request path parameter "$.appInstanceId" is set to a valid application ID + When the request "getAppDeployments" is sent + Then response code is 200 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And information of all existing app deployments of given app is returned + And the response body complies with the OAS schema at "/components/schemas/AppDeploymentInfo" + And the response property "$name" has the value provided for createAppInstance + And the response property "$appId" has the value provided for createAppInstance + And the response property "$appInstanceId" has the value provided for createAppInstance and used as path parameter + And the response property "$appProvider" has the value provided for createAppInstance + And the response property "$edgeCloudZoneId" has the value provided for createAppInstance + + + + # Errors + + # Error 404 + + @EdgeCloud_EAM_getAppDeployments_404.1_not_found_filtered_by_appInstanceId + Scenario: Get a list of application deployments info with a non-existing appInstanceId + Given there are running deployments of the app + And the path parameter "$.appInstanceId" is set to an invalid application instance ID + When the request "getAppDeployments" is sent + Then response code is 404 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response property "$.status" is 404 + And the response property "$.code" is "NOT_FOUND" + And the response property "$.message" contains a user friendly text + + @EdgeCloud_EAM_getAppDeployments_404.2_not_found_filtered_by_appId + Scenario: Get a list of application deployments info with a non-existing appId + Given the path parameter "appId" is set to a random UUID + When the request "getAppDeployments" is sent + Then response code is "404" + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response property "$.status" is 404 + And the response property "$.code" is "NOT_FOUND" + And the response property "$.message" contains a user friendly text + + # Error 403 + + @EdgeCloud_eam_getAppDeployments_403.1_missing_access_token_scope + Scenario: Missing access token scope + Given the header "Authorization" is set to an access token that does not include the required scope + When the request "getAppDeployments" is sent + Then the response status code is 403 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text + + # Error 410 + + @EdgeCloud_eam_getAppDeployments_410.1_gone + Scenario: Get information of a removed app deployment + Given app instance with "$.appDeploymentId" was removed by removeAppDeployment operation + And the request path parameter "$.appDeploymentId" is set to an already removed removeAppDeployment Id + When the request "getAppDeployments" is sent + Then response code is 410 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 410 + And the response property "$.code" is "GONE" + And the response property "$.message" contains a user friendly text diff --git a/code/Test_definitions/edge-cloud-eam-getAppInstance.feature b/code/Test_definitions/edge-cloud-eam-getAppInstance.feature new file mode 100644 index 00000000..7d55bc39 --- /dev/null +++ b/code/Test_definitions/edge-cloud-eam-getAppInstance.feature @@ -0,0 +1,129 @@ +Feature: CAMARA Edge Application Management API, vwip - Operation getAppInstance + # Input to be provided by the implementation to the tester + # + # Implementation indications: + # * apiRoot: API root of the server URL + # + # Testing assets: + # * An appId of a submitted application and the values used in the submitApp operation. + # * An Application instantiated by createAppInstance operation + + # References to OAS spec schemas refer to schemas specified in edge-application-management.yaml + + Background: Common getAppInstance setup + Given an environment at "apiRoot" + And the resource "/edge-application-management/vwip/appinstances" + And the header "Content-Type" is set to "application/json" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" + + + # Success scenarios + + + @EdgeCloud_EAM_getAppInstance_01_generic_success_scenario + Scenario: Get information of all existing application instances + Given there are application instances created by operation createAppInstance + When the request "getAppInstance" is sent + Then response code is 200 + And A list of existing app instances is returned + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response body complies with the OAS schema at "/components/schemas/AppInstanceInfo" + + @EdgeCloud_EAM_getAppInstance_02_success_scenario_filtered_by_appId + Scenario: Get application instances info with mandatory parameter ("appId") + Given there are application instances created by operation createAppInstance + And the request path parameter "$.appId" is set to a valid application ID + When the request "getAppInstance" is sent + Then response code is 200 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And information of all existing app instances of given app is returned + And the response body complies with the OAS schema at "/components/schemas/AppInstanceInfo" + + @EdgeCloud_EAM_getAppInstance_03_success_scenario_filtered_by_appInstanceId + Scenario: Get application instances info with mandatory parameter ("appInstanceId") + Given there are application instances created by operation createAppInstance + And the request path parameter "$.appInstanceId" is set to a valid application ID + When the request "getAppInstance" is sent + Then response code is 200 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And information of all existing app instances of given app is returned + And the response body complies with the OAS schema at "/components/schemas/AppInstanceInfo" + And the response property "$name" has the value provided for createAppInstance + And the response property "$appId" has the value provided for createAppInstance + And the response property "$appInstanceId" has the value provided for createAppInstance and used as path parameter + And the response property "$appProvider" has the value provided for createAppInstance + And the response property "$edgeCloudZoneId" has the value provided for createAppInstance + + @EdgeCloud_EAM_getAppInstance_04_success_scenario_filtered_by_region + Scenario: Get application instances info with mandatory parameter ("region") + Given there are application instances created by operation createAppInstance + And the request path parameter "$.region" is set to a valid application ID + When the request "getAppInstance" is sent + Then response code is 200 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And information of all existing app instances running in the specified region is returned + And the response body complies with the OAS schema at "/components/schemas/AppInstanceInfo" + + + # Errors + + # Error 404 + + @EdgeCloud_EAM_getAppInstance_404.1_not_found_filtered_by_appInstanceId + Scenario: Get a list of application instances info with a non-existing appInstanceId + Given there are running instances of the app + And the path parameter "$.appInstanceId" is set to an invalid application instance ID + When the request "getAppInstance" is sent + Then response code is 404 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response property "$.status" is 404 + And the response property "$.code" is "NOT_FOUND" + And the response property "$.message" contains a user friendly text + + @EdgeCloud_EAM_getAppInstance_404.2_not_found_filtered_by_appId + Scenario: Get a list of application instances info with a non-existing appId + Given the path parameter "appId" is set to a random UUID + When the request "getAppInstance" is sent + Then response code is "404" + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response property "$.status" is 404 + And the response property "$.code" is "NOT_FOUND" + And the response property "$.message" contains a user friendly text + + # Error 403 + + @EdgeCloud_eam_getAppInstance_403.1_missing_access_token_scope + Scenario: Missing access token scope + Given the header "Authorization" is set to an access token that does not include the required scope + When the request "getAppInstance" is sent + Then the response status code is 403 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text + + # Error 410 + + #/deployments GET 410 + @EdgeCloud_eam_getAppInstance_410.1_gone + Scenario: Get information of a removed app instance + Given app instance with "$.appDeploymentId" was removed by removeAppInstance operation + And the request path parameter "$.appDeploymentId" is set to an already removed appInstance Id + When the request "getAppInstance" is sent + Then response code is 410 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 410 + And the response property "$.code" is "GONE" + And the response property "$.message" contains a user friendly text + + + diff --git a/code/Test_definitions/edge-cloud-eam-getApps.feature b/code/Test_definitions/edge-cloud-eam-getApps.feature new file mode 100644 index 00000000..0c253308 --- /dev/null +++ b/code/Test_definitions/edge-cloud-eam-getApps.feature @@ -0,0 +1,61 @@ +Feature: CAMARA Edge Application Management API, vwip - Operations getApps + # Input to be provided by the implementation to the tester + # + # Implementation indications: + # * apiRoot: API root of the server URL + # + # Testing assets: + # * Several Apps submitted in the edge cloud. + # + + # References to OAS spec schemas refer to schemas specified in edge-application-management.yaml + + Background: Common getApps setup + Given an environment at "apiRoot" + And the resource "/edge-application-management/vwip/apps" + And the header "Content-Type" is set to "application/json" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" + + + # Success scenarios + + @EdgeCloud_EAM_getApps_01_generic_success_scenario + Scenario: Get information of all existing applications + Given there are applications submitted by operation submitApp + When the request "getApps" is sent + Then response code is 200 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And A list of applications with information of them is returned + And the response body complies with the OAS schema at "/components/schemas/AppManifest" + + + # Errors + + # Error 404 + + @EdgeCloud_EAM_getApps_404.1_apps_not_found + Scenario: Get a list of application that the user has permission to view + Given there are not any application submitted by operation submitApp + When the request "getApps" is sent + Then response code is 404 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 404 + And the response property "$.code" is "NOT_FOUND" + And the response property "$.message" contains a user friendly text + + # Errors 403 + + @EdgeCloud_eam_getApps_403.1_missing_access_token_scope + Scenario: Missing access token scope + Given the header "Authorization" is set to an access token that does not include the required scope + When the request "getApps" is sent + Then the response status code is 403 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text + diff --git a/code/Test_definitions/edge-cloud-eam-getClusters.feature b/code/Test_definitions/edge-cloud-eam-getClusters.feature new file mode 100644 index 00000000..26f3e61e --- /dev/null +++ b/code/Test_definitions/edge-cloud-eam-getClusters.feature @@ -0,0 +1,97 @@ +Feature: CAMARA Edge Application Management API, vwip - Operation getClusters + # Input to be provided by the implementation to the tester + # + # Implementation indications: + # * apiRoot: API root of the server URL + # + # Testing assets: + # * An available cluster to get information + # + + # References to OAS spec schemas refer to schemas specified in edge-application-management.yaml + + + Background: Common getClusters setup + Given an environment at "apiRoot" + And the resource "/edge-application-management/vwip/clusters" + And the header "Content-Type" is set to "application/json" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" + + + # Success scenarios + + #/clusters GET 200 + @EdgeCloud_EAM_getClusters_01_generic_success_scenario + Scenario: Get information of existing clusters + Given There are at least one cluster available + When the request "getClusters" is sent + Then response code is 200 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And A list of clusters is returned + And the response body complies with the OAS schema at "/components/schemas/ClusterInfo" + + #/clusters GET 200 filtered by region + @EdgeCloud_EAM_getClusters_02_generic_success_scenario_filtered_by_region + Scenario: Get information of existing clusters with optional parameters ("region") + Given There are at least one cluster available + And the path parameter "$.region" is set to a valid region + When When the request "getClusters" is sent + Then response code is 200 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And information of clusters of "$.region" is returned + And the response body complies with the OAS schema at "/components/schemas/ClusterInfo" + + #/clusters GET 200 filtered by edgeCloudZoneId + @EdgeCloud_EAM_getClusters_03_generic_success_scenario_filtered_by_edgeCloudZone + Scenario: Get information of existing clusters with optional parameters ("edgeCloudZoneId") + Given There are at least one cluster available + And the path parameter "$.edgeCloudZoneId" is set to a valid edgeCloudZoneId + When When the request "getClusters" is sent + Then response code is 200 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And information of clusters of "$.edgeCloudZoneId" is returned + And the response body complies with the OAS schema at "/components/schemas/ClusterInfo" + + #/clusters GET 200 filtered by clusterRef + @EdgeCloud_EAM_getClusters_04_generic_success_scenario_filtered_by_clusterRef + Scenario: Get information of existing clusters with optional parameters ("edgeCloudZoneId") + Given There are at least one cluster available + And the path parameter "$.clusterRef" is set to a valid clusterRef + When When the request "getClusters" is sent + Then response code is 200 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And information of clusters of "$.edgeCloudZoneId" is returned + And the response body complies with the OAS schema at "/components/schemas/ClusterInfo" + + + #Errors + + #/clusters GET 404 + @EdgeCloud_EAM_getClusters_404.1_not_found + Scenario: Get information of existing clusters with optional parameters ("region") + Given the path parameter "$.region" is set to an invalid region + When When the request "getClusters" is sent + Then response code is 404 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 404 + And the response property "$.code" is "NOT_FOUND" + And the response property "$.message" contains a user friendly text + + # Errors 403 + + @EdgeCloud_EAM_getClusters_403.1_missing_access_token_scope + Scenario: Missing access token scope + Given the header "Authorization" is set to an access token that does not include the required scope + When When the request "getClusters" is sent + Then the response status code is 403 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text \ No newline at end of file diff --git a/code/Test_definitions/edge-cloud-eam-getEdgeCloudZones.feature b/code/Test_definitions/edge-cloud-eam-getEdgeCloudZones.feature new file mode 100644 index 00000000..92983a73 --- /dev/null +++ b/code/Test_definitions/edge-cloud-eam-getEdgeCloudZones.feature @@ -0,0 +1,85 @@ +Feature: CAMARA Edge Application Management API, vwip - Operation getEdgeCloudZones + # Input to be provided by the implementation to the tester + # + # Implementation indications: + # * apiRoot: API root of the server URL + # + # Testing assets: + # * An available edge Cloud Zones to get information + # + + # References to OAS spec schemas refer to schemas specified in edge-application-management.yaml + + + Background: Common getEdgeCloudZones setup + Given an environment at "apiRoot" + And the resource "/edge-application-management/vwip/edge-cloud-zones" + And the header "Content-Type" is set to "application/json" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" + + + # Success scenarios + + #/edge-cloud-zones GET 200 + @EdgeCloud_EAM_getEdgeCloudZone_01_generic_success_scenario + Scenario: Get information of existing edge cloud zones + Given There are at least one Edge Cloud Zones available + When the request "getEdgeCloudZone" is sent + Then response code is 200 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And A list of Edge Cloud Zones is returned + And the response body complies with the OAS schema at "/components/schemas/EdgeCloudZones" + + #/edge-cloud-zones GET 200 filtered by region + @EdgeCloud_EAM_getEdgeCloudZone_02_generic_success_scenario_filtered_by_region + Scenario: Get information of existing Edge Cloud Zones with optional parameters ("region") + Given There are at least one Edge Cloud Zones available + And the path parameter "$.region" is set to a valid region + When When the request "getEdgeCloudZone" is sent + Then response code is 200 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And information of Edge Cloud Zones of "$.region" is returned + And the response body complies with the OAS schema at "/components/schemas/EdgeCloudZones" + + #/edge-cloud-zones GET 200 filtered by status + @EdgeCloud_EAM_getEdgeCloudZone_03_generic_success_scenario_filtered_by_status + Scenario: Get information of existing Edge Cloud Zones with optional parameters ("status") + Given There are at least one Edge Cloud Zones available + And the path parameter "$.status" is set to a valid status + When When the request "getEdgeCloudZone" is sent + Then response code is 200 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And information of Edge Cloud Zones of "$.status" is returned + And the response body complies with the OAS schema at "/components/schemas/EdgeCloudZones" + + + #Errors + + #/edge-cloud-zones GET 404 + @EdgeCloud_EAM_getEdgeCloudZone_404.1_not_found + Scenario: Get information of existing Edge Cloud Zones with optional parameters ("region") + Given the path parameter "$.region" is set to an invalid region + When When the request "getEdgeCloudZone" is sent + Then response code is 404 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 404 + And the response property "$.code" is "NOT_FOUND" + And the response property "$.message" contains a user friendly text + + # Errors 403 + + @EdgeCloud_EAM_getEdgeCloudZone_403.1_missing_access_token_scope + Scenario: Missing access token scope + Given the header "Authorization" is set to an access token that does not include the required scope + When When the request "getEdgeCloudZone" is sent + Then the response status code is 403 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text \ No newline at end of file diff --git a/code/Test_definitions/edge-cloud-eam-submitApp.feature b/code/Test_definitions/edge-cloud-eam-submitApp.feature new file mode 100644 index 00000000..cca70d46 --- /dev/null +++ b/code/Test_definitions/edge-cloud-eam-submitApp.feature @@ -0,0 +1,120 @@ +Feature: CAMARA Edge Application Management API, vwip - Operation submitApp + # Input to be provided by the implementation to the tester + # + # Implementation indications: + # * apiRoot: API root of the server URL + # + # Testing assets: + # * An AppManifest object applicable for being submitted and deployed in the edge cloud. + # + + # References to OAS spec schemas refer to schemas specified in edge-application-management.yaml + + Background: Common submitApp setup + Given an environment at "apiRoot" + And the resource "/edge-application-management/vwip/apps" + And the header "Content-Type" is set to "application/json" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" + # Properties not explicitly overwritten in the Scenarios can take any values compliant with the schema + And the request body is set by default to a request body compliant with the schema at "/components/schemas/AppManifest" + + # Success scenarios + + @edgeCloud_eam_submitApp_01_generic_success_scenario + Scenario: Common validations for any success scenario. Submit an App with mandatory parameters + # Valid testing device and default request body compliant with the schema + Given A valid application to be submitted + And the request body property "$.name" is set to a valid name + And the request body property "$.appPorvider" is set to a application provider + And the request body property "$.version" is set to a valid version + And the request body property "$.packageType" is set to a valid package type + And the request body property "$.appRepo" is set to a valid repository + And the request body property "$.requiredResources" is set to a valid required resources object + And the request body property "$.componentSpect" is set to a valid object + When the request "submitApp" is sent + Then response code is 201 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has the same value as the request header "x-correlator" + And the response body complies with the OAS schema at "/components/schemas/SubmittedApp" + And the response property "$.appId" is returned + + # Error scenarios + + # Error 409 + + @EdgeCloud_eam_submitApp_409.1_conflict + Scenario: Error response when an application is already submitted + Given an AppManifest request body referencing an already submitted application + And the request body property "$.name" is set to an existing application name + And the request body property "$.version" is set to the same version of the existing application + When invoking with the POST method to submit an app with all required parameters + Then response code is 409 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.code" is "CONFLICT" + And the response property "$.message" contains a user friendly text + + # Error 400 + + @EdgeCloud_eam_submitApp_400.1_schema_not_compliant + Scenario: Invalid Argument. Generic Syntax Exception + Given the request body is set to any value which is not compliant with the schema at "/components/schemas/AppManifest" + When the request "submitApp" is sent + Then the response status code is 400 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @EdgeCloud_eam_submitApp_400.2_no_request_body + Scenario: Missing request body + Given the request body is not included + When the request "submitApp" is sent + Then the response status code is 400 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @EdgeCloud_eam_submitApp_400.3_empty_request_body + Scenario: Empty object as request body + Given the request body is set to {} + When the request "submitApp" is sent + Then the response status code is 400 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @EdgeCloud_eam_submitApp_400.4_empty_property + Scenario: Error response for empty property in request body + Given the request body property "" is set to {} + When the request "submitApp" is sent + Then the response status code is 400 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + # Errors 403 + + @EdgeCloud_eam_submitApp_403.1_missing_access_token_scope + Scenario: Missing access token scope + Given the header "Authorization" is set to an access token that does not include the required scope + When the request "submitApp" is sent + Then the response status code is 403 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text + + + + + diff --git a/code/Test_definitions/edge-cloud-eam-updateAppDeployment.feature b/code/Test_definitions/edge-cloud-eam-updateAppDeployment.feature new file mode 100644 index 00000000..d62d917a --- /dev/null +++ b/code/Test_definitions/edge-cloud-eam-updateAppDeployment.feature @@ -0,0 +1,78 @@ +Feature: CAMARA Edge Application Management API, vwip - Operation updateAppDeployment + # Input to be provided by the implementation to the tester + # + # Implementation indications: + # * apiRoot: API root of the server URL + # + # Testing assets: + # * An appId of a submitted application and the values used in the submitApp operation. + # * A deployment instantiated by createAppDeployment operation. + # + + # References to OAS spec schemas refer to schemas specified in edge-application-management.yaml + + Background: Common updateAppDeployment setup + Given an environment at "apiRoot" + And the resource "/edge-application-management/vwip/deployment/{appDeploymentId}" + And the header "Content-Type" is set to "application/json" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" + # Properties not explicitly overwritten in the Scenarios can take any values compliant with the schema + And the request body is set by default to a request body compliant with the schema at "/components/schemas/AppDeploymentManifest" + + + # Success scenarios + + @EdgeCloud_EAM_updateAppDeployment_01_generic_success_scenario + Scenario: Update a running instance of an application within an Edge Cloud Zone with mandatory parameter ("appDeploymentId") + Given there are application instances running + And the request path parameter "$.appDeploymentIdd" is set to a valid application ID + And the body property "$.appDeploymentName" is set to a valid name + When the request "deleteApp" is sent + Then response code is 200 + And the response header "Content-Type" is "application/json" + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response body complies with the OAS schema at "/components/schemas/AppInstanceInfo" + + # Errors + + # Error 404 + + @EdgeCloud_EAM_updateAppDeployment_404.1_invalid_parameter + Scenario: Update a running instance of an application within an Edge Cloud Zone with mandatory, and non-existing, parameter ("appDeploymentId") + Given there are application instances running + And the path parameter "$.appDeploymentId" is set to an invalid application instance ID + When the request "updateAppDeployment" is sent + Then response code is 404 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 404 + And the response property "$.code" is "NOT_FOUND" + And the response property "$.message" contains a user friendly text + + # Error 403 + @EdgeCloud_eam_updateAppDeployment_403.1_missing_access_token_scope + Scenario: Missing access token scope + Given the header "Authorization" is set to an access token that does not include the required scope + When the request "updateAppDeployment" is sent + Then the response status code is 403 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text + + + # Error 409, Conflict: What is the required scenario to get this error? + + # Error 410 + @EdgeCloud_eam_updateAppDeployment_410.1_gone + Scenario: Update an already removed deployment + Given the request path parameter "$.appDeploymentId" is set to an already removed Deployment ID + When the request "updateAppDeployment" is sent + Then response code is 410 + And the response header "x-correlator" has same value as the request header "x-correlator" + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 410 + And the response property "$.code" is "GONE" + And the response property "$.message" contains a user friendly text \ No newline at end of file