Skip to content

Commit

Permalink
Updated test for extending sessions not available
Browse files Browse the repository at this point in the history
  • Loading branch information
jlurien committed Aug 30, 2024
1 parent 9146b15 commit 6c1e798
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
1 change: 0 additions & 1 deletion code/Test_definitions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ The test plan has to be enhanced and some scenarios still contains comments and
* Now that QoS Profiles may be restricted to certain devices, what code to return when the provided device in createSession is not suitable for the provided qosProfile. We may reuse 422 DEVICE_NOT_APPLICABLE
* When providing a path parameter, such sessionId or provisioningId, which is not compliant with the spec format (UUID), what code to return? Options are 400 INVALID_ARGUMENT or 404 NOT_FOUND if path parameter format is not checked previously
* 422 UNSUPPORTED_DEVICE_IDENTIFIERS is in the Commonalities guidelines (document) but it is not yet in the artifact and it not yet considered in the quality-on-demand or qos-profiles API specs, but it is in qod-provisioning API spec
* It is not defined the expected behavior when extending the duration of a session in qosStatus REQUESTED or UNAVAILABLE
* For QoS Profile response validations, it is pending to check additional constraints, such as minDuration being less or equal than maxDuration, etc
* When accessing a session or provisioning created by a different client, both 403 INVALID_TOKEN_CONTEXT and the generic 403 PERMISSION_DENIED codes could make sense.

Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,6 @@ Feature: CAMARA Quality On Demand API, v0.11.0 - Operation extendQosSessionDurat
And the response body complies with the OAS schema at "/components/schemas/SessionInfo"
And the response property "$.duration" does not exceed the "maxDuration" for the QoS Profile

# To be discussed. Behaviour when the qosStatus of the session is REQUESTED
@quality_on_demand_extendQosSessionDuration_03_requestedSession
Scenario: Response extending duration for requested session
Given an existing QoS session created by operation createSession with qosStatus "REQUESTED"
And the path parameter "sessionId" is set to the value for that QoS session
And the request body is set to a valid request body
When the request "extendQosSessionDuration" is sent
Then the response status code is TBD
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"

# To be discussed. Behaviour when the qosStatus of the session is UNAVAILABLE
@quality_on_demand_extendQosSessionDuration_04_unavailableSession
Scenario: Response extending duration for unavailable session
Given an existing QoS session created by operation createSession with qosStatus "UNAVAILABLE"
And the path parameter "sessionId" is set to the value for that QoS session
And the request body is set to a valid request body
When the request "extendQosSessionDuration" is sent
Then the response status code is TBD
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"

# Errors 400

@quality_on_demand_extendQosSessionDuration_400.1_schema_not_compliant
Expand Down Expand Up @@ -192,3 +170,18 @@ Feature: CAMARA Quality On Demand API, v0.11.0 - Operation extendQosSessionDurat
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 409

@quality_on_demand_extendQosSessionDuration_409.1_session_not_available
Scenario: Extending duration for session with qosStatus not available
Given an existing QoS session with qosStatus not "AVAILABLE"
And the path parameter "sessionId" is set to the value for that QoS session
And the request body is set to a valid request body
When the request "extendQosSessionDuration" is sent
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 "$.status" is 409
And the response property "$.code" is "QUALITY_ON_DEMAND.SESSION_EXTENSION_NOT_ALLOWED"
And the response property "$.message" contains a user friendly text

0 comments on commit 6c1e798

Please sign in to comment.