Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions code/Test_definitions/assessment.feature

This file was deleted.

16 changes: 0 additions & 16 deletions code/Test_definitions/creation.feature

This file was deleted.

15 changes: 0 additions & 15 deletions code/Test_definitions/deletion.feature

This file was deleted.

16 changes: 0 additions & 16 deletions code/Test_definitions/modification.feature

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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
99 changes: 99 additions & 0 deletions code/Test_definitions/multi-point-vpn-create-network.feature
Original file line number Diff line number Diff line change
@@ -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
84 changes: 84 additions & 0 deletions code/Test_definitions/multi-point-vpn-delete-network.feature
Original file line number Diff line number Diff line change
@@ -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
Loading