Skip to content
Merged
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
38 changes: 38 additions & 0 deletions code/Test_definitions/predictive-connectivity-data.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ Feature: CAMARA Predictive Connectivity Data API, vwip
# * Network connectivity types allowed
# * Max and min height allowed
# * Include the signal strength allowed
# * Whether `PRIVATE_KEY_JWT` is accepted as `sinkCredential.credentialType`
# * Max size of the response(Combination of area, startTime, endTime, service level and precision requested) supported for a sync response
# * Max size of the response(Combination of area, startTime, endTime, service level and precision requested) supported for an async response
# * Limitations about max complexity of requested area allowed
#
# Testing assets:
# * An Area within the supported region
# * An Area partially within the supported region
# * An API consumer with a JWK Set pre-configured for `PRIVATE_KEY_JWT` authentication
# * An API consumer with no JWK Set configured for `PRIVATE_KEY_JWT` authentication
# * An Area outside the supported region
#
# References to OAS spec schemas refer to schemas specified in predictive-connectivity-data.yaml
Expand Down Expand Up @@ -234,6 +237,28 @@ Feature: CAMARA Predictive Connectivity Data API, vwip
And all the items in response property "$.timedConnectivityData[*].cellConnectivityData[*].layerConnectivities[*]" are equal to "GC", "MC" or "NC"
And the response property "$.timedConnectivityData[*].cellConnectivityData[*].layerSignalStrengths" is not included in the response

# The JWT authentication parameters have to be pre-configured out-of-band between the API consumer and the
# API provider, as no response of this API returns "$.sinkCredential" and therefore the provider's "jwksUri"
# is never conveyed in-band
@predictive_connectivity_data_14_async_private_key_jwt_success_scenario
Scenario: Validate success async response for a request when sinkCredential uses PRIVATE_KEY_JWT
# Property "$.sink" is set with a valid publicly accessible HTTPS endpoint
Given the API provider has a JWK Set pre-configured for the API consumer used in the test
And the request body property "$.area" is set to a valid testing area within supported regions
And the request body properties "$.startTime" and "$.endTime" are valid future date-times, with "$.endTime" later than "$.startTime"
And the request body property "$.serviceLevel" is set to a valid communication service level
And the request body property "$.sink" is set to a valid HTTPS URL
And the request body property "$.sinkCredential" is set to a valid credential with property "$.sinkCredential.credentialType" set to "PRIVATE_KEY_JWT"
When the request "retrieveConnectivity" 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 includes property "$.operationId"
And the response does not include property "$.sinkCredential"
And the request with the response body will be received at the address of the request property "$.sink" with property "$.operationId" equal to response property "$.operationId"
And the request will have header "Authorization" set to "Bearer " + an access token requested to the request property "$.sinkCredential.tokenUri" with the request property "$.sinkCredential.clientId"
And the request body complies with the OAS schema at "/components/schemas/ConnectivityDataAsyncResponse"

# Error scenarios

# Error 400 scenarios
Expand Down Expand Up @@ -637,6 +662,19 @@ Feature: CAMARA Predictive Connectivity Data API, vwip
And the response property "$.code" is "PREDICTIVE_CONNECTIVITY_DATA.UNSUPPORTED_SERVICE_LEVEL"
And the response property "$.message" contains a user friendly text

@predictive_connectivity_data_422.07_private_key_jwt_not_configured
#To test this scenario the API consumer must not have a JWK Set pre-configured for PRIVATE_KEY_JWT authentication
Scenario: Error 422 when PRIVATE_KEY_JWT is requested and no JWK Set is configured for the API consumer
Given the API provider has no JWK Set configured for the API consumer used in the test
And the request body property "$.sink" is set to a valid HTTPS URL
And the request body property "$.sinkCredential" is set to a valid credential with property "$.sinkCredential.credentialType" set to "PRIVATE_KEY_JWT"
When the request "retrieveConnectivity" is sent
Then the response status code is 422
And the response header "Content-Type" is "application/json"
And the response property "$.status" is 422
And the response property "$.code" is "PRIVATE_KEY_JWT_NOT_CONFIGURED"
And the response property "$.message" contains a user friendly text

# Error 429 scenarios

@predictive_connectivity_data_429.01_too_many_requests
Expand Down
Loading