diff --git a/code/Test_definitions/assessment.feature b/code/Test_definitions/assessment.feature deleted file mode 100644 index c3c4f3b..0000000 --- a/code/Test_definitions/assessment.feature +++ /dev/null @@ -1,21 +0,0 @@ -Feature: Assessment of MultiPoint VPN availability - - Background: - Given I am authenticated with scope "vpn:write" - - @single_site_assessment_completed - Scenario: Successful single site assessment - Given a valid tenant and one access node - When I POST "/assessments" with SLA "AA", bandwidth "500 Mbps", and duration "30 days" - Then the response includes availabilityLevel, estimatedFees, assessmentId, and status "completed" - - @Assessment_with_multiple_nodes_available - Scenario: Assessment with multiple nodes - Given multiple sites including DC, branch, and cloud region - When I POST "/assessments" with SLA "AAA" and bandwidth "1 Gbps" - Then the response includes composite feasibility and per-site availability - - @SLA_tier_invalid - Scenario: Invalid SLA tier - When I POST "/assessments" with SLA "AAAA" - Then I receive 400 with error.code "invalid_sla_tier" diff --git a/code/Test_definitions/creation.feature b/code/Test_definitions/creation.feature deleted file mode 100644 index 56bebd7..0000000 --- a/code/Test_definitions/creation.feature +++ /dev/null @@ -1,16 +0,0 @@ -Feature: Creation of MultiPoint VPN - - Background: - Given I am authenticated with scope "vpn:write" - - @VPN_from_assessment_provisioning - Scenario: Create VPN from assessment - Given an assessment with SLA "AA", bandwidth "1000 Mbps", duration "90 days", and 3 nodes - When I POST "/vpns" with the assessmentId and topology "hub-and-spoke" - Then I receive 201 with a vpnId and status "provisioning" - - @VPN_creation_duplicate - Scenario: Idempotent VPN creation - Given I have a valid request body for VPN creation - When I retry POST "/vpns" with the same x-idempotency-key - Then I receive the same vpnId without duplicating orders diff --git a/code/Test_definitions/deletion.feature b/code/Test_definitions/deletion.feature deleted file mode 100644 index 22fdb56..0000000 --- a/code/Test_definitions/deletion.feature +++ /dev/null @@ -1,15 +0,0 @@ -Feature: Deletion of MultiPoint VPN - - Background: - Given I am authenticated with scope "vpn:write" - - @Terminate_active_VPN_deleted - Scenario: Terminate active VPN - Given a VPN in status "active" - When I DELETE "/vpns/{vpnId}" - Then the status transitions to "terminating" and then "deleted" - - @Delete_non-existent_VPN - Scenario: Delete non-existent VPN - When I DELETE "/vpns/{badId}" - Then I receive 404 Not Found diff --git a/code/Test_definitions/modification.feature b/code/Test_definitions/modification.feature deleted file mode 100644 index 80248bf..0000000 --- a/code/Test_definitions/modification.feature +++ /dev/null @@ -1,16 +0,0 @@ -Feature: Modification of MultiPoint VPN - - Background: - Given I am authenticated with scope "vpn:write" - - @Scale_bandwidth_1000 - Scenario: Scale up bandwidth - Given a VPN with vpnId in status "active" and bandwidth "500 Mbps" - When I PATCH "/vpns/{vpnId}" to set bandwidth "1000 Mbps" - Then the status transitions to "reconfiguring" and then "active" - - @SLA_upgrade_AAA - Scenario: SLA upgrade - Given a VPN with SLA "AA" - When I PATCH "/vpns/{vpnId}" to SLA "AAA" - Then the response indicates reassessment or acceptance based on policy diff --git a/code/Test_definitions/multi-point-vpn-assess-connection-feasibility.feature b/code/Test_definitions/multi-point-vpn-assess-connection-feasibility.feature new file mode 100644 index 0000000..0e5cffb --- /dev/null +++ b/code/Test_definitions/multi-point-vpn-assess-connection-feasibility.feature @@ -0,0 +1,98 @@ +Feature: CAMARA MultiPoint VPN API, vwip - Operation assessConnectionFeasibility + + Background: + Given an environment at "apiRoot" + And the resource "/multi-point-vpn/vwip/assessment" + 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" + And the request body is compliant with the schema at "#/components/schemas/AssessmentRequest" + + @multi_point_vpn_assessConnectionFeasibility_success_01_assessment_result + Scenario: Successfully assess multipoint VPN connection feasibility + Given the request body property "$.isProtected" is set to true + And the request body property "$.connections" contains a valid connection with customerEdge and providerEdge + And the request body property "$.guaranteeBandwidth" is set to 20 + And the request body property "$.duration" is set to a valid Duration object with value 6 and unit "days" + When the request "assessConnectionFeasibility" 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 the same value as the request header "x-correlator" + And the response body complies with the schema at "#/components/schemas/AssessmentResult" + + @multi_point_vpn_assessConnectionFeasibility_error_400_01_invalid_request_body + Scenario: Error 400 due to request body not complying with AssessmentRequest schema + Given the request body does not comply with the schema at "#/components/schemas/AssessmentRequest" + When the request "assessConnectionFeasibility" is sent + Then the response status code is 400 + 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 "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_assessConnectionFeasibility_error_400_02_out_of_range_bandwidth + Scenario: Error 400 due to guaranteeBandwidth value out of allowed range + Given the request body property "$.guaranteeBandwidth" is set to a value not between 1 and 1000000 + When the request "assessConnectionFeasibility" is sent + Then the response status code is 400 + 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 "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" or "OUT_OF_RANGE" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_assessConnectionFeasibility_error_400_03_invalid_duration_unit + Scenario: Error 400 due to duration unit not matching allowed enum + Given the request body property "$.duration.unit" is set to a value not in ["minutes", "hours", "days", "months", "years"] + When the request "assessConnectionFeasibility" is sent + Then the response status code is 400 + 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 "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_assessConnectionFeasibility_error_401_01_no_authorization_header + Scenario: Error 401 when Authorization header is missing + Given the header "Authorization" is removed + When the request "assessConnectionFeasibility" is sent + Then the response status code is 401 + 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 "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_assessConnectionFeasibility_error_401_02_expired_access_token + Scenario: Error 401 when access token is expired + Given the header "Authorization" is set to an expired access token + When the request "assessConnectionFeasibility" is sent + Then the response status code is 401 + 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 "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_assessConnectionFeasibility_error_403_01_missing_scope + Scenario: Error 403 when access token lacks the multi-point-vpn:assessment:assess scope + Given the header "Authorization" is set to a valid access token without the "multi-point-vpn:assessment:assess" scope + When the request "assessConnectionFeasibility" is sent + Then the response status code is 403 + 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 "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_assessConnectionFeasibility_error_500_01_internal_server_error + Scenario: Error 500 due to internal server error + Given an internal server error occurs + When the request "assessConnectionFeasibility" is sent + Then the response status code is 500 + 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 "$.status" is 500 + And the response property "$.code" is "INTERNAL" + And the response property "$.message" contains a user friendly text diff --git a/code/Test_definitions/multi-point-vpn-create-network.feature b/code/Test_definitions/multi-point-vpn-create-network.feature new file mode 100644 index 0000000..7d01841 --- /dev/null +++ b/code/Test_definitions/multi-point-vpn-create-network.feature @@ -0,0 +1,99 @@ +Feature: CAMARA MultiPoint VPN API, vwip - Operation createNetwork + + Background: + Given an environment at "apiRoot" + And the resource "/multi-point-vpn/vwip/networks" + 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" + + @multi_point_vpn_createNetwork_success_01_create_network + Scenario: Successfully create a multipoint VPN network + Given the request body complies with the schema at "#/components/schemas/NetworkCreate" + And the request body property "$.isProtected" is set to true + And the request body property "$.connections" contains at least one valid connection with customerEdge and providerEdge + And the request body property "$.guaranteeBandwidth" is set to 20 + And the request body property "$.sla" is set to "AA" + When the request "createNetwork" 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 schema at "#/components/schemas/Network" + And the response property "$.serviceId" is present + + @multi_point_vpn_createNetwork_error_400_01_invalid_argument + Scenario: Error 400 due to request body not complying with NetworkCreate schema + Given the request body does not comply with the schema at "#/components/schemas/NetworkCreate" + When the request "createNetwork" is sent + Then the response status code is 400 + 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 "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_createNetwork_error_400_02_out_of_range_bandwidth + Scenario: Error 400 due to guaranteeBandwidth value out of allowed range + Given the request body property "$.guaranteeBandwidth" is set to a value not between 1 and 1000000 + When the request "createNetwork" is sent + Then the response status code is 400 + 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 "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" or "OUT_OF_RANGE" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_createNetwork_error_400_03_invalid_sla + Scenario: Error 400 due to sla value not matching allowed enum + Given the request body property "$.sla" is set to a value not in ["A", "AA", "AAA"] + When the request "createNetwork" is sent + Then the response status code is 400 + 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 "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_createNetwork_error_401_01_no_authorization_header + Scenario: Error 401 when Authorization header is missing + Given the header "Authorization" is removed + When the request "createNetwork" is sent + Then the response status code is 401 + 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 "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_createNetwork_error_401_02_expired_access_token + Scenario: Error 401 when access token is expired + Given the header "Authorization" is set to an expired access token + When the request "createNetwork" is sent + Then the response status code is 401 + 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 "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_createNetwork_error_403_01_missing_scope + Scenario: Error 403 when access token lacks the multi-point-vpn:network:create scope + Given the header "Authorization" is set to a valid access token without the "multi-point-vpn:network:create" scope + When the request "createNetwork" is sent + Then the response status code is 403 + 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 "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_createNetwork_error_500_01_internal_server_error + Scenario: Error 500 due to internal server error + Given an internal server error occurs + When the request "createNetwork" is sent + Then the response status code is 500 + 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 "$.status" is 500 + And the response property "$.code" is "INTERNAL" + And the response property "$.message" contains a user friendly text diff --git a/code/Test_definitions/multi-point-vpn-delete-network.feature b/code/Test_definitions/multi-point-vpn-delete-network.feature new file mode 100644 index 0000000..0089ec4 --- /dev/null +++ b/code/Test_definitions/multi-point-vpn-delete-network.feature @@ -0,0 +1,84 @@ +Feature: CAMARA MultiPoint VPN API, vwip - Operation deleteNetwork + + Background: + Given an environment at "apiRoot" + And the resource "/multi-point-vpn/vwip/networks/{serviceId}" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" + + @multi_point_vpn_deleteNetwork_success_01_delete_accepted + Scenario: Successfully request deletion of a multipoint VPN network + Given the path parameter "serviceId" is set to an existing network identifier + When the request "deleteNetwork" is sent + Then the response status code is 202 + And the response header "x-correlator" has the same value as the request header "x-correlator" + + @multi_point_vpn_deleteNetwork_error_400_01_invalid_serviceId + Scenario: Error 400 due to serviceId not complying with the allowed pattern + Given the path parameter "serviceId" does not comply with the schema at "#/components/parameters/serviceId" + When the request "deleteNetwork" is sent + Then the response status code is 400 + 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 "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_deleteNetwork_error_401_01_no_authorization_header + Scenario: Error 401 when Authorization header is missing + Given the header "Authorization" is removed + And the path parameter "serviceId" is set to an existing network identifier + When the request "deleteNetwork" is sent + Then the response status code is 401 + 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 "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_deleteNetwork_error_401_02_expired_access_token + Scenario: Error 401 when access token is expired + Given the header "Authorization" is set to an expired access token + And the path parameter "serviceId" is set to an existing network identifier + When the request "deleteNetwork" is sent + Then the response status code is 401 + 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 "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_deleteNetwork_error_403_01_missing_scope + Scenario: Error 403 when access token lacks the multi-point-vpn:network:delete scope + Given the header "Authorization" is set to a valid access token without the "multi-point-vpn:network:delete" scope + And the path parameter "serviceId" is set to an existing network identifier + When the request "deleteNetwork" is sent + Then the response status code is 403 + 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 "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_deleteNetwork_error_404_01_network_not_found + Scenario: Error 404 when the requested network does not exist + Given the path parameter "serviceId" is set to a non-existent network identifier + When the request "deleteNetwork" 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 the 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 + + @multi_point_vpn_deleteNetwork_error_500_01_internal_server_error + Scenario: Error 500 due to internal server error + Given an internal server error occurs + And the path parameter "serviceId" is set to an existing network identifier + When the request "deleteNetwork" is sent + Then the response status code is 500 + 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 "$.status" is 500 + And the response property "$.code" is "INTERNAL" + And the response property "$.message" contains a user friendly text diff --git a/code/Test_definitions/multi-point-vpn-get-network.feature b/code/Test_definitions/multi-point-vpn-get-network.feature new file mode 100644 index 0000000..e489bff --- /dev/null +++ b/code/Test_definitions/multi-point-vpn-get-network.feature @@ -0,0 +1,87 @@ +Feature: CAMARA MultiPoint VPN API, vwip - Operation getNetwork + + Background: + Given an environment at "apiRoot" + And the resource "/multi-point-vpn/vwip/networks/{serviceId}" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" + + @multi_point_vpn_getNetwork_success_01_get_network_details + Scenario: Successfully retrieve multipoint VPN network details + Given the path parameter "serviceId" is set to an existing network identifier + When the request "getNetwork" 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 the same value as the request header "x-correlator" + And the response body complies with the schema at "#/components/schemas/Network" + And the response property "$.serviceId" is present + + @multi_point_vpn_getNetwork_error_400_01_invalid_serviceId + Scenario: Error 400 due to serviceId not complying with the allowed pattern + Given the path parameter "serviceId" does not comply with the schema at "#/components/parameters/serviceId" + When the request "getNetwork" is sent + Then the response status code is 400 + 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 "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_getNetwork_error_401_01_no_authorization_header + Scenario: Error 401 when Authorization header is missing + Given the header "Authorization" is removed + And the path parameter "serviceId" is set to an existing network identifier + When the request "getNetwork" is sent + Then the response status code is 401 + 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 "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_getNetwork_error_401_02_expired_access_token + Scenario: Error 401 when access token is expired + Given the header "Authorization" is set to an expired access token + And the path parameter "serviceId" is set to an existing network identifier + When the request "getNetwork" is sent + Then the response status code is 401 + 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 "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_getNetwork_error_403_01_missing_scope + Scenario: Error 403 when access token lacks the multi-point-vpn:network:read scope + Given the header "Authorization" is set to a valid access token without the "multi-point-vpn:network:read" scope + And the path parameter "serviceId" is set to an existing network identifier + When the request "getNetwork" is sent + Then the response status code is 403 + 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 "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_getNetwork_error_404_01_network_not_found + Scenario: Error 404 when the requested network does not exist + Given the path parameter "serviceId" is set to a non-existent network identifier + When the request "getNetwork" 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 the 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 + + @multi_point_vpn_getNetwork_error_500_01_internal_server_error + Scenario: Error 500 due to internal server error + Given an internal server error occurs + And the path parameter "serviceId" is set to an existing network identifier + When the request "getNetwork" is sent + Then the response status code is 500 + 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 "$.status" is 500 + And the response property "$.code" is "INTERNAL" + And the response property "$.message" contains a user friendly text diff --git a/code/Test_definitions/multi-point-vpn-update-network.feature b/code/Test_definitions/multi-point-vpn-update-network.feature new file mode 100644 index 0000000..d43014f --- /dev/null +++ b/code/Test_definitions/multi-point-vpn-update-network.feature @@ -0,0 +1,113 @@ +Feature: CAMARA MultiPoint VPN API, vwip - Operation updateNetwork + + Background: + Given an environment at "apiRoot" + And the resource "/multi-point-vpn/vwip/networks/{serviceId}" + And the header "Content-Type" is set to "application/merge-patch+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" + + @multi_point_vpn_updateNetwork_success_01_update_bandwidth + Scenario: Successfully update guaranteeBandwidth of a multipoint VPN network + Given the path parameter "serviceId" is set to an existing network identifier + And the request body property "$.guaranteeBandwidth" is set to 1000 + When the request "updateNetwork" 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 the same value as the request header "x-correlator" + And the response body complies with the schema at "#/components/schemas/Network" + And the response property "$.guaranteeBandwidth" is 1000 + + @multi_point_vpn_updateNetwork_success_02_update_sla + Scenario: Successfully update SLA of a multipoint VPN network + Given the path parameter "serviceId" is set to an existing network identifier + And the request body property "$.sla" is set to "AAA" + When the request "updateNetwork" 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 the same value as the request header "x-correlator" + And the response body complies with the schema at "#/components/schemas/Network" + And the response property "$.sla" is "AAA" + + @multi_point_vpn_updateNetwork_error_400_01_invalid_request_body + Scenario: Error 400 due to request body not complying with NetworkUpdate schema + Given the path parameter "serviceId" is set to an existing network identifier + And the request body does not comply with the schema at "#/components/schemas/NetworkUpdate" + When the request "updateNetwork" is sent + Then the response status code is 400 + 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 "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_updateNetwork_error_400_02_out_of_range_bandwidth + Scenario: Error 400 due to guaranteeBandwidth value out of allowed range + Given the path parameter "serviceId" is set to an existing network identifier + And the request body property "$.guaranteeBandwidth" is set to a value not between 1 and 1000000 + When the request "updateNetwork" is sent + Then the response status code is 400 + 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 "$.status" is 400 + And the response property "$.code" is "INVALID_ARGUMENT" or "OUT_OF_RANGE" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_updateNetwork_error_401_01_no_authorization_header + Scenario: Error 401 when Authorization header is missing + Given the header "Authorization" is removed + And the path parameter "serviceId" is set to an existing network identifier + When the request "updateNetwork" is sent + Then the response status code is 401 + 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 "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_updateNetwork_error_401_02_expired_access_token + Scenario: Error 401 when access token is expired + Given the header "Authorization" is set to an expired access token + And the path parameter "serviceId" is set to an existing network identifier + When the request "updateNetwork" is sent + Then the response status code is 401 + 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 "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_updateNetwork_error_403_01_missing_scope + Scenario: Error 403 when access token lacks the multi-point-vpn:network:update scope + Given the header "Authorization" is set to a valid access token without the "multi-point-vpn:network:update" scope + And the path parameter "serviceId" is set to an existing network identifier + When the request "updateNetwork" is sent + Then the response status code is 403 + 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 "$.status" is 403 + And the response property "$.code" is "PERMISSION_DENIED" + And the response property "$.message" contains a user friendly text + + @multi_point_vpn_updateNetwork_error_404_01_network_not_found + Scenario: Error 404 when the requested network does not exist + Given the path parameter "serviceId" is set to a non-existent network identifier + When the request "updateNetwork" 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 the 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 + + @multi_point_vpn_updateNetwork_error_500_01_internal_server_error + Scenario: Error 500 due to internal server error + Given an internal server error occurs + And the path parameter "serviceId" is set to an existing network identifier + When the request "updateNetwork" is sent + Then the response status code is 500 + 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 "$.status" is 500 + And the response property "$.code" is "INTERNAL" + And the response property "$.message" contains a user friendly text diff --git a/code/Test_definitions/multi-point-vpn.feature b/code/Test_definitions/multi-point-vpn.feature index edeadf8..e463356 100644 --- a/code/Test_definitions/multi-point-vpn.feature +++ b/code/Test_definitions/multi-point-vpn.feature @@ -4,94 +4,95 @@ Feature: CAMARA MultiPoint VPN API vwip Given an environment with CAMARA MultiPoint VPN API And the request headers contain a valid access token with the required scope - # createNetwork - POST /network + # createNetwork - POST /networks - @createNetwork_01_success + @multi_point_vpn_createNetwork_01_success Scenario: Successfully create a multipoint VPN Given a valid NetworkCreate request body with serviceName, isProtected, connections, guaranteeBandwidth, sla, and duration - When I send a POST request to "/network" + When I send a POST request to "/networks" Then the response status code is 201 - And the response body includes serviceId, connections, resourceGroupId, and cloudGatewayIP + And the response body includes serviceId, connections, resourceGroupId, and cloudGatewayIp - @createNetwork_02_invalid_argument + @multi_point_vpn_createNetwork_02_invalid_argument Scenario: Create VPN with missing required fields Given a NetworkCreate request body with missing connections - When I send a POST request to "/network" + When I send a POST request to "/networks" Then the response status code is 400 And the response property "$.code" is "INVALID_ARGUMENT" - @createNetwork_03_unauthorized + @multi_point_vpn_createNetwork_03_unauthorized Scenario: Create VPN without authentication Given the request does not include an access token - When I send a POST request to "/network" + When I send a POST request to "/networks" Then the response status code is 401 And the response property "$.code" is "UNAUTHENTICATED" - # getVpnConnection - GET /network/{serviceId} + # getNetwork - GET /networks/{serviceId} - @getVpnConnection_01_success + @multi_point_vpn_getNetwork_01_success Scenario: Successfully retrieve a multipoint VPN Given an existing VPN with a known serviceId - When I send a GET request to "/network/{serviceId}" + When I send a GET request to "/networks/{serviceId}" Then the response status code is 200 And the response body includes serviceId, connections, sla, and guaranteeBandwidth - @getVpnConnection_02_not_found + @multi_point_vpn_getNetwork_02_not_found Scenario: Retrieve a non-existent VPN Given a serviceId that does not exist - When I send a GET request to "/network/{serviceId}" + When I send a GET request to "/networks/{serviceId}" Then the response status code is 404 + And the response property "$.code" is "NOT_FOUND" - # updateNetwork - PATCH /network/{serviceId} + # updateNetwork - PATCH /networks/{serviceId} - @updateNetwork_01_success + @multi_point_vpn_updateNetwork_01_success Scenario: Successfully update a multipoint VPN Given an existing VPN with a known serviceId And a valid NetworkUpdate request body with guaranteeBandwidth and sla - When I send a PATCH request to "/network/{serviceId}" + When I send a PATCH request to "/networks/{serviceId}" Then the response status code is 200 And the response body reflects the updated guaranteeBandwidth and sla - @updateNetwork_02_invalid_argument + @multi_point_vpn_updateNetwork_02_invalid_argument Scenario: Update VPN with out-of-range bandwidth Given an existing VPN with a known serviceId And a NetworkUpdate request body with guaranteeBandwidth of 0 - When I send a PATCH request to "/network/{serviceId}" + When I send a PATCH request to "/networks/{serviceId}" Then the response status code is 400 And the response property "$.code" is "INVALID_ARGUMENT" - # deleteNetwork - DELETE /network/{serviceId} + # deleteNetwork - DELETE /networks/{serviceId} - @deleteNetwork_01_success + @multi_point_vpn_deleteNetwork_01_success Scenario: Successfully delete a multipoint VPN Given an existing VPN with a known serviceId - When I send a DELETE request to "/network/{serviceId}" + When I send a DELETE request to "/networks/{serviceId}" Then the response status code is 202 - @deleteNetwork_02_unauthorized + @multi_point_vpn_deleteNetwork_02_unauthorized Scenario: Delete VPN without authentication Given the request does not include an access token - When I send a DELETE request to "/network/{serviceId}" + When I send a DELETE request to "/networks/{serviceId}" Then the response status code is 401 And the response property "$.code" is "UNAUTHENTICATED" # assessConnectionFeasibility - POST /assessment - @assessConnectionFeasibility_01_success + @multi_point_vpn_assessConnectionFeasibility_01_success Scenario: Successfully assess VPN connection feasibility Given a valid AssessmentRequest body with isProtected, connections, guaranteeBandwidth, and duration When I send a POST request to "/assessment" Then the response status code is 200 - And the response body includes waitdays, sla, and rent + And the response body includes waitDays, sla, and rent - @assessConnectionFeasibility_02_invalid_argument - Scenario: Assess feasibility with invalid SLA bandwidth + @multi_point_vpn_assessConnectionFeasibility_02_invalid_argument + Scenario: Assess feasibility with invalid bandwidth Given an AssessmentRequest body with guaranteeBandwidth of 0 When I send a POST request to "/assessment" Then the response status code is 400 And the response property "$.code" is "INVALID_ARGUMENT" - @assessConnectionFeasibility_03_unauthorized + @multi_point_vpn_assessConnectionFeasibility_03_unauthorized Scenario: Assess feasibility without authentication Given the request does not include an access token When I send a POST request to "/assessment" diff --git a/code/Test_definitions/query.feature b/code/Test_definitions/query.feature deleted file mode 100644 index 335dd46..0000000 --- a/code/Test_definitions/query.feature +++ /dev/null @@ -1,14 +0,0 @@ -Feature: Query MultiPoint VPN details - - Background: - Given I am authenticated with scope "vpn:read" - - @Get_VPN_ID - Scenario: Get VPN by ID - When I GET "/vpns/{vpnId}" - Then the response includes SLA, bandwidth, topology, nodes, and lifecycle state - - @VPNs_filters_active - Scenario: List VPNs with filters - When I GET "/vpns?status=active&tenantId=..." - Then the response includes paginated results with total count