|
| 1 | +Feature: CAMARA MultiPoint VPN API, vwip - Operation assessConnectionFeasibility |
| 2 | + |
| 3 | + Background: |
| 4 | + Given an environment at "apiRoot" |
| 5 | + And the resource "/multi-point-vpn/vwip/assessment" |
| 6 | + And the header "Content-Type" is set to "application/json" |
| 7 | + And the header "Authorization" is set to a valid access token |
| 8 | + And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator" |
| 9 | + And the request body is compliant with the schema at "#/components/schemas/AssessmentRequest" |
| 10 | + |
| 11 | + @multi_point_vpn_assessConnectionFeasibility_success_01_assessment_result |
| 12 | + Scenario: Successfully assess multipoint VPN connection feasibility |
| 13 | + Given the request body property "$.isProtected" is set to true |
| 14 | + And the request body property "$.connections" contains a valid connection with customerEdge and providerEdge |
| 15 | + And the request body property "$.guaranteeBandwidth" is set to 20 |
| 16 | + And the request body property "$.duration" is set to a valid Duration object with value 6 and unit "days" |
| 17 | + When the request "assessConnectionFeasibility" is sent |
| 18 | + Then the response status code is 200 |
| 19 | + And the response header "Content-Type" is "application/json" |
| 20 | + And the response header "x-correlator" has the same value as the request header "x-correlator" |
| 21 | + And the response body complies with the schema at "#/components/schemas/AssessmentResult" |
| 22 | + |
| 23 | + @multi_point_vpn_assessConnectionFeasibility_error_400_01_invalid_request_body |
| 24 | + Scenario: Error 400 due to request body not complying with AssessmentRequest schema |
| 25 | + Given the request body does not comply with the schema at "#/components/schemas/AssessmentRequest" |
| 26 | + When the request "assessConnectionFeasibility" is sent |
| 27 | + Then the response status code is 400 |
| 28 | + And the response header "Content-Type" is "application/json" |
| 29 | + And the response header "x-correlator" has the same value as the request header "x-correlator" |
| 30 | + And the response property "$.status" is 400 |
| 31 | + And the response property "$.code" is "INVALID_ARGUMENT" |
| 32 | + And the response property "$.message" contains a user friendly text |
| 33 | + |
| 34 | + @multi_point_vpn_assessConnectionFeasibility_error_400_02_out_of_range_bandwidth |
| 35 | + Scenario: Error 400 due to guaranteeBandwidth value out of allowed range |
| 36 | + Given the request body property "$.guaranteeBandwidth" is set to a value not between 1 and 1000000 |
| 37 | + When the request "assessConnectionFeasibility" is sent |
| 38 | + Then the response status code is 400 |
| 39 | + And the response header "Content-Type" is "application/json" |
| 40 | + And the response header "x-correlator" has the same value as the request header "x-correlator" |
| 41 | + And the response property "$.status" is 400 |
| 42 | + And the response property "$.code" is "INVALID_ARGUMENT" or "OUT_OF_RANGE" |
| 43 | + And the response property "$.message" contains a user friendly text |
| 44 | + |
| 45 | + @multi_point_vpn_assessConnectionFeasibility_error_400_03_invalid_duration_unit |
| 46 | + Scenario: Error 400 due to duration unit not matching allowed enum |
| 47 | + Given the request body property "$.duration.unit" is set to a value not in ["minutes", "hours", "days", "months", "years"] |
| 48 | + When the request "assessConnectionFeasibility" is sent |
| 49 | + Then the response status code is 400 |
| 50 | + And the response header "Content-Type" is "application/json" |
| 51 | + And the response header "x-correlator" has the same value as the request header "x-correlator" |
| 52 | + And the response property "$.status" is 400 |
| 53 | + And the response property "$.code" is "INVALID_ARGUMENT" |
| 54 | + And the response property "$.message" contains a user friendly text |
| 55 | + |
| 56 | + @multi_point_vpn_assessConnectionFeasibility_error_401_01_no_authorization_header |
| 57 | + Scenario: Error 401 when Authorization header is missing |
| 58 | + Given the header "Authorization" is removed |
| 59 | + When the request "assessConnectionFeasibility" is sent |
| 60 | + Then the response status code is 401 |
| 61 | + And the response header "Content-Type" is "application/json" |
| 62 | + And the response header "x-correlator" has the same value as the request header "x-correlator" |
| 63 | + And the response property "$.status" is 401 |
| 64 | + And the response property "$.code" is "UNAUTHENTICATED" |
| 65 | + And the response property "$.message" contains a user friendly text |
| 66 | + |
| 67 | + @multi_point_vpn_assessConnectionFeasibility_error_401_02_expired_access_token |
| 68 | + Scenario: Error 401 when access token is expired |
| 69 | + Given the header "Authorization" is set to an expired access token |
| 70 | + When the request "assessConnectionFeasibility" is sent |
| 71 | + Then the response status code is 401 |
| 72 | + And the response header "Content-Type" is "application/json" |
| 73 | + And the response header "x-correlator" has the same value as the request header "x-correlator" |
| 74 | + And the response property "$.status" is 401 |
| 75 | + And the response property "$.code" is "UNAUTHENTICATED" |
| 76 | + And the response property "$.message" contains a user friendly text |
| 77 | + |
| 78 | + @multi_point_vpn_assessConnectionFeasibility_error_403_01_missing_scope |
| 79 | + Scenario: Error 403 when access token lacks the multi-point-vpn:assessment:assess scope |
| 80 | + Given the header "Authorization" is set to a valid access token without the "multi-point-vpn:assessment:assess" scope |
| 81 | + When the request "assessConnectionFeasibility" is sent |
| 82 | + Then the response status code is 403 |
| 83 | + And the response header "Content-Type" is "application/json" |
| 84 | + And the response header "x-correlator" has the same value as the request header "x-correlator" |
| 85 | + And the response property "$.status" is 403 |
| 86 | + And the response property "$.code" is "PERMISSION_DENIED" |
| 87 | + And the response property "$.message" contains a user friendly text |
| 88 | + |
| 89 | + @multi_point_vpn_assessConnectionFeasibility_error_500_01_internal_server_error |
| 90 | + Scenario: Error 500 due to internal server error |
| 91 | + Given an internal server error occurs |
| 92 | + When the request "assessConnectionFeasibility" is sent |
| 93 | + Then the response status code is 500 |
| 94 | + And the response header "Content-Type" is "application/json" |
| 95 | + And the response header "x-correlator" has the same value as the request header "x-correlator" |
| 96 | + And the response property "$.status" is 500 |
| 97 | + And the response property "$.code" is "INTERNAL" |
| 98 | + And the response property "$.message" contains a user friendly text |
0 commit comments