diff --git a/code/Test_definitions/edge-cloud-eam-createAppDeployment.feature b/code/Test_definitions/edge-application-management-createAppDeployment.feature similarity index 86% rename from code/Test_definitions/edge-cloud-eam-createAppDeployment.feature rename to code/Test_definitions/edge-application-management-createAppDeployment.feature index 9fac32f..0d7c293 100644 --- a/code/Test_definitions/edge-cloud-eam-createAppDeployment.feature +++ b/code/Test_definitions/edge-application-management-createAppDeployment.feature @@ -1,112 +1,112 @@ -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 +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 + @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 the response status 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 for this operation and status code + And the response body contains the "appDeploymentId" + @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 the response status 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 for this operation and status code + And the response body contains the "appDeploymentId" + # Error scenarios + #Error 409 + @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 the response status 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 + @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/AppDeploymentManifest" + 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 + @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 + @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 + @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 + @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 diff --git a/code/Test_definitions/edge-cloud-eam-createAppInstance.feature b/code/Test_definitions/edge-application-management-createAppInstance.feature similarity index 87% rename from code/Test_definitions/edge-cloud-eam-createAppInstance.feature rename to code/Test_definitions/edge-application-management-createAppInstance.feature index c3a38c0..035a2ef 100644 --- a/code/Test_definitions/edge-cloud-eam-createAppInstance.feature +++ b/code/Test_definitions/edge-application-management-createAppInstance.feature @@ -1,112 +1,110 @@ -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 +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 + @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 the response status 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" + @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 the response status 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" + # Error scenarios + #Error 409 + @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 the response status 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 + @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 + @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 + @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 + @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 + @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 diff --git a/code/Test_definitions/edge-cloud-eam-deleteApp.feature b/code/Test_definitions/edge-application-management-deleteApp.feature similarity index 89% rename from code/Test_definitions/edge-cloud-eam-deleteApp.feature rename to code/Test_definitions/edge-application-management-deleteApp.feature index 57b6add..ce4a200 100644 --- a/code/Test_definitions/edge-cloud-eam-deleteApp.feature +++ b/code/Test_definitions/edge-application-management-deleteApp.feature @@ -1,62 +1,63 @@ -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 +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 + @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 status 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 response body complies with the OAS schema for this operation and status code + And the application information is deleted + # Errors + # Error 409 + @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 status 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 + @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 status 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 + @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 diff --git a/code/Test_definitions/edge-cloud-eam-deleteAppDeployment.feature b/code/Test_definitions/edge-application-management-deleteAppDeployment.feature similarity index 87% rename from code/Test_definitions/edge-cloud-eam-deleteAppDeployment.feature rename to code/Test_definitions/edge-application-management-deleteAppDeployment.feature index 5ad2daf..a244efe 100644 --- a/code/Test_definitions/edge-cloud-eam-deleteAppDeployment.feature +++ b/code/Test_definitions/edge-application-management-deleteAppDeployment.feature @@ -1,62 +1,62 @@ -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 +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 + @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 the response status 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 response body complies with the OAS schema for this operation and status code + # Errors + # Error 404 + @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 the response status 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 + @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 + @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 the response status 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-deleteAppInstance.feature b/code/Test_definitions/edge-application-management-deleteAppInstance.feature similarity index 85% rename from code/Test_definitions/edge-cloud-eam-deleteAppInstance.feature rename to code/Test_definitions/edge-application-management-deleteAppInstance.feature index a27221b..f23adb7 100644 --- a/code/Test_definitions/edge-cloud-eam-deleteAppInstance.feature +++ b/code/Test_definitions/edge-application-management-deleteAppInstance.feature @@ -1,60 +1,60 @@ -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") - async - 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") - sync - 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 +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 + @eam_deleteAppInstance_01_generic_success_scenario_async + Scenario: Delete a running instance of an application within an Edge Cloud Zone with mandatory parameter ("appInstanceId") - async + 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 the response status 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 response body complies with the OAS schema for this operation and status code + @eam_deleteAppInstance_02_generic_success_scenario_sync + Scenario: Delete a running instance of an application within an Edge Cloud Zone with mandatory parameter ("appInstanceId") - sync + 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 the response status 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 response body complies with the OAS schema for this operation and status code + # Errors + # Error 404 + @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 the response status 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 + @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 diff --git a/code/Test_definitions/edge-cloud-eam-getApp.feature b/code/Test_definitions/edge-application-management-getApp.feature similarity index 92% rename from code/Test_definitions/edge-cloud-eam-getApp.feature rename to code/Test_definitions/edge-application-management-getApp.feature index bccefe1..051f9b4 100644 --- a/code/Test_definitions/edge-cloud-eam-getApp.feature +++ b/code/Test_definitions/edge-application-management-getApp.feature @@ -1,66 +1,66 @@ -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 +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 + + @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 + + @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 the response status 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 + + @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 diff --git a/code/Test_definitions/edge-cloud-eam-getAppDeployments.feature b/code/Test_definitions/edge-application-management-getAppDeployments.feature similarity index 88% rename from code/Test_definitions/edge-cloud-eam-getAppDeployments.feature rename to code/Test_definitions/edge-application-management-getAppDeployments.feature index 0f03277..7524884 100644 --- a/code/Test_definitions/edge-cloud-eam-getAppDeployments.feature +++ b/code/Test_definitions/edge-application-management-getAppDeployments.feature @@ -1,97 +1,97 @@ -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 +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 + @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 the response status 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" + @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 the response status 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" + @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 the response status 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 + @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 the response status 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 + @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 the response status 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 + @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 + @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 the response status 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-application-management-getAppInstance.feature similarity index 87% rename from code/Test_definitions/edge-cloud-eam-getAppInstance.feature rename to code/Test_definitions/edge-application-management-getAppInstance.feature index 2a0daf3..86b1338 100644 --- a/code/Test_definitions/edge-cloud-eam-getAppInstance.feature +++ b/code/Test_definitions/edge-application-management-getAppInstance.feature @@ -1,108 +1,108 @@ -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 +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 + @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 the response status 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" + @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 the response status 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" + @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 the response status 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 + @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 the response status 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 + @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 the response status 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 + @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 the response status 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 + @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 + @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 the response status 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-application-management-getApps.feature similarity index 89% rename from code/Test_definitions/edge-cloud-eam-getApps.feature rename to code/Test_definitions/edge-application-management-getApps.feature index f33792e..a10b295 100644 --- a/code/Test_definitions/edge-cloud-eam-getApps.feature +++ b/code/Test_definitions/edge-application-management-getApps.feature @@ -1,49 +1,49 @@ -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 +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 + @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 the response status 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 + @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 the response status 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 + @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-application-management-getClusters.feature similarity index 87% rename from code/Test_definitions/edge-cloud-eam-getClusters.feature rename to code/Test_definitions/edge-application-management-getClusters.feature index dc3508d..e0cdf5e 100644 --- a/code/Test_definitions/edge-cloud-eam-getClusters.feature +++ b/code/Test_definitions/edge-application-management-getClusters.feature @@ -1,83 +1,83 @@ -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 ("clusterRef") - 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 invalid 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 +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 + @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 the response status 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 + @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 the response status 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 + @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 the response status 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 + @eam_getClusters_04_generic_success_scenario_filtered_by_clusterRef + Scenario: Get information of existing clusters with optional parameters ("clusterRef") + 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 the response status 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 + @eam_getClusters_404.1_not_found + Scenario: Get information of existing clusters with invalid optional parameters ("region") + Given the path parameter "$.region" is set to an invalid region + When When the request "getClusters" is sent + Then the response status 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 + @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 diff --git a/code/Test_definitions/edge-cloud-eam-getEdgeCloudZones.feature b/code/Test_definitions/edge-application-management-getEdgeCloudZones.feature similarity index 87% rename from code/Test_definitions/edge-cloud-eam-getEdgeCloudZones.feature rename to code/Test_definitions/edge-application-management-getEdgeCloudZones.feature index b624e31..447a728 100644 --- a/code/Test_definitions/edge-cloud-eam-getEdgeCloudZones.feature +++ b/code/Test_definitions/edge-application-management-getEdgeCloudZones.feature @@ -1,72 +1,72 @@ -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 invalid 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 +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 + @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 the response status 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 + @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 the response status 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 + @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 the response status 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 + @eam_getEdgeCloudZone_404.1_not_found + Scenario: Get information of existing Edge Cloud Zones with invalid optional parameters ("region") + Given the path parameter "$.region" is set to an invalid region + When When the request "getEdgeCloudZone" is sent + Then the response status 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 + @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 diff --git a/code/Test_definitions/edge-cloud-eam-submitApp.feature b/code/Test_definitions/edge-application-management-submitApp.feature similarity index 91% rename from code/Test_definitions/edge-cloud-eam-submitApp.feature rename to code/Test_definitions/edge-application-management-submitApp.feature index 627d66f..1961b8f 100644 --- a/code/Test_definitions/edge-cloud-eam-submitApp.feature +++ b/code/Test_definitions/edge-application-management-submitApp.feature @@ -1,101 +1,101 @@ -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 +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 + @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 the response status 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 + @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 the response status 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 + @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 + @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 + @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 + @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 + @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-application-management-updateAppDeployment.feature similarity index 88% rename from code/Test_definitions/edge-cloud-eam-updateAppDeployment.feature rename to code/Test_definitions/edge-application-management-updateAppDeployment.feature index f3cd7d0..770fe25 100644 --- a/code/Test_definitions/edge-cloud-eam-updateAppDeployment.feature +++ b/code/Test_definitions/edge-application-management-updateAppDeployment.feature @@ -1,66 +1,65 @@ -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 +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 + @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 the response status 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 + @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 the response status 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 + @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 410 + @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 the response status 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