Skip to content

Commit

Permalink
[uss_qualifier] SCD - split subscription related fragments (#537)
Browse files Browse the repository at this point in the history
[uss_qualifier] DSS0210 - split subscription related fragments
  • Loading branch information
Shastick authored Mar 12, 2024
1 parent 0d73a7b commit da335eb
Show file tree
Hide file tree
Showing 11 changed files with 161 additions and 114 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Create subscription test step fragment

This test step fragment validates that subscriptions can be created.

## 🛑 Create subscription query succeeds check

As per **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**, the DSS API must allow callers to create a subscription with either one or both of the
start and end time missing, provided all the required parameters are valid.

## 🛑 Create subscription response is correct check

A successful subscription creation query is expected to return a well-defined body, the content of which reflects the created subscription.
If the format and content of the response are not conforming, the DSS is failing to implement **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.

## ⚠️ Create subscription response format conforms to spec check

The response to a successful subscription creation query is expected to conform to the format defined by the OpenAPI specification under the `A3.1` Annex of ASTM F3548−21.

If it does not, the DSS is failing to implement **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.

## 🛑 Response to subscription creation contains a subscription check

As per **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**, upon creation of a subscription,
the newly created subscription must be part of its response.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Delete subscription test step fragment

This test step fragment validates that subscriptions can be deleted.

## 🛑 Subscription can be deleted check

An attempt to delete a subscription when the correct version is provided should succeed, otherwise the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.

## ⚠️ Delete subscription response format conforms to spec check

The response to a successful subscription deletion query is expected to conform to the format defined by the OpenAPI specification under the `A3.1` Annex of ASTM F3548−21.

If it does not, the DSS is failing to implement **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Read subscription test step fragment

This test step fragment validates that subscriptions can be read.

## 🛑 Get Subscription by ID check

If a subscription cannot be queried using its ID, the DSS is failing to meet **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.

## ⚠️ Get subscription response format conforms to spec check

The response to a successful get subscription query is expected to conform to the format defined by the OpenAPI specification under the `A3.1` Annex of ASTM F3548−21.

If it does not, the DSS is failing to implement **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.

## 🛑 Successful subscription search query check

If the DSS fails to let us search in the area for which the subscription was created, it is failing to meet **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.

## 🛑 Created Subscription is in search results check

If the existing subscription is not returned in a search that covers the area it was created for, the DSS is not properly implementing **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Update subscription test step fragment

This test step fragment validates that subscriptions can be updated.

## 🛑 Subscription can be mutated check

If a subscription cannot be modified with a valid set of parameters, the DSS is failing to meet **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.

## 🛑 Response to subscription mutation contains a subscription check

As per **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**, upon mutation of a subscription,
the newly created subscription must be part of its response.

## ⚠️ Mutate subscription response format conforms to spec check

The response to a successful subscription mutation query is expected to conform to the format defined by the OpenAPI specification under the `A3.1` Annex of ASTM F3548−21.

If it does not, the DSS is failing to implement **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,39 @@ This test step fragment validates that subscriptions are properly synchronized a
## 🛑 Subscription can be found at every DSS check

If the previously created or mutated subscription cannot be found at a DSS, either one of the instances at which the subscription was created or the one that was queried,
may be failing to implement **[astm.f3548.v21.DSS0210,1a](../../../../../requirements/astm/f3548/v21.md)**.
may be failing to implement **[astm.f3548.v21.DSS0210,1a](../../../../../../requirements/astm/f3548/v21.md)**.

## 🛑 Propagated subscription contains the correct USS base URL check

If the subscription returned by a DSS to which the subscription was synchronized to does not contain the correct USS base URL,
either one of the instances at which the subscription was created or the one that was queried, may be failing to implement **[astm.f3548.v21.DSS0210,1c](../../../../../requirements/astm/f3548/v21.md)**.
either one of the instances at which the subscription was created or the one that was queried, may be failing to implement **[astm.f3548.v21.DSS0210,1c](../../../../../../requirements/astm/f3548/v21.md)**.

## 🛑 Propagated subscription contains the correct start time check

If the subscription returned by a DSS to which the subscription was synchronized to does not contain the correct start time,
either one of the instances at which the subscription was created or the one that was queried, may be failing to implement **[astm.f3548.v21.DSS0210,1e](../../../../../requirements/astm/f3548/v21.md)**.
either one of the instances at which the subscription was created or the one that was queried, may be failing to implement **[astm.f3548.v21.DSS0210,1e](../../../../../../requirements/astm/f3548/v21.md)**.

## 🛑 Propagated subscription contains the correct end time check

If the subscription returned by a DSS to which the subscription was synchronized to does not contain the correct end time,
either one of the instances at which the subscription was created or the one that was queried, may be failing to implement **[astm.f3548.v21.DSS0210,1e](../../../../../requirements/astm/f3548/v21.md)**.
either one of the instances at which the subscription was created or the one that was queried, may be failing to implement **[astm.f3548.v21.DSS0210,1e](../../../../../../requirements/astm/f3548/v21.md)**.

## 🛑 Propagated subscription contains the correct version check

If the subscription returned by a DSS to which the subscription was synchronized to does not contain the correct version,
either one of the instances at which the subscription was created or the one that was queried, may be failing to implement **[astm.f3548.v21.DSS0210,1f](../../../../../requirements/astm/f3548/v21.md)**.
either one of the instances at which the subscription was created or the one that was queried, may be failing to implement **[astm.f3548.v21.DSS0210,1f](../../../../../../requirements/astm/f3548/v21.md)**.

## 🛑 Propagated subscription contains the correct notification flags check

If the subscription returned by a DSS to which the subscription was synchronized to does not contain the correct notification flags,
either one of the instances at which the subscription was created or the one that was queried, may be failing to implement **[astm.f3548.v21.DSS0210,1g](../../../../../requirements/astm/f3548/v21.md)**.
either one of the instances at which the subscription was created or the one that was queried, may be failing to implement **[astm.f3548.v21.DSS0210,1g](../../../../../../requirements/astm/f3548/v21.md)**.

## 🛑 Propagated subscription contains the correct implicit flag check

If the subscription returned by a DSS to which the subscription was synchronized to does not contain the correct implicit flag,
either one of the instances at which the subscription was created or the one that was queried, may be failing to implement **[astm.f3548.v21.DSS0210,1h](../../../../../requirements/astm/f3548/v21.md)**.
either one of the instances at which the subscription was created or the one that was queried, may be failing to implement **[astm.f3548.v21.DSS0210,1h](../../../../../../requirements/astm/f3548/v21.md)**.

## 🛑 Propagated subscription contains expected notification count check

If the subscription returned by a DSS to which the subscription was synchronized to does not contain the expected notification count,
either one of the instances at which the subscription was created or the one that was queried, may be failing to implement **[astm.f3548.v21.DSS0210,1i](../../../../../requirements/astm/f3548/v21.md)**.
either one of the instances at which the subscription was created or the one that was queried, may be failing to implement **[astm.f3548.v21.DSS0210,1i](../../../../../../requirements/astm/f3548/v21.md)**.
Original file line number Diff line number Diff line change
@@ -1,67 +1,59 @@
# Validate subscription test step fragment

This test step fragment attempts to validate a single subscription returned by the DSS after its creation or mutation.
This test step fragment attempts to validate the content of a single subscription returned by the DSS.

The code for these checks lives in the [subscription_validator.py](../validators/subscription_validator.py) class.
The code for these checks lives in the [subscription_validator.py](../../../validators/subscription_validator.py) class.

## ⚠️ Returned subscription ID is correct check

If the returned subscription ID does not correspond to the one specified in the creation parameters,
**[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)** is not respected.
**[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)** is not respected.

## ⚠️ New subscription has a notification index of 0 check

The notification index of a newly created subscription must be 0, otherwise the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
The notification index of a newly created subscription must be 0, otherwise the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.

## ⚠️ Returned notification index is equal to or greater than 0 check

If the notification index of the subscription is less than 0, the DSS fails to properly implement **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
If the notification index of the subscription is less than 0, the DSS fails to properly implement **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.

## ⚠️ Returned subscription has an USS base URL check

If the returned subscription has no USS base URL defined, **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)** is not respected.
If the returned subscription has no USS base URL defined, **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)** is not respected.

## ⚠️ Returned USS base URL has correct base URL check

The returned USS base URL must be prefixed with the USS base URL that was provided at subscription creation, otherwise the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
The returned USS base URL must be prefixed with the USS base URL that was provided at subscription creation, otherwise the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.

## ⚠️ Returned subscription has a start time check

If the returned subscription has no start time defined, **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)** is not respected.
If the returned subscription has no start time defined, **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)** is not respected.

## ⚠️ Returned start time is correct check

The returned start time must be the same as the provided one, otherwise the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
The returned start time must be the same as the provided one, otherwise the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.

## ⚠️ Returned subscription has an end time check

Subscriptions need a defined end time in order to limit their duration: if the DSS omits to set the end time, it will be in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
Subscriptions need a defined end time in order to limit their duration: if the DSS omits to set the end time, it will be in violation of **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.

## ⚠️ Returned end time is correct check

The returned end time must be the same as the provided one, otherwise the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
The returned end time must be the same as the provided one, otherwise the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.

## ⚠️ Returned subscription has a version check

If the returned subscription has no version defined, **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)** is not respected.

## ⚠️ Non-mutated subscription keeps the same version check

If the version of the subscription is updated without there having been any mutation of the subscription, the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.

## ⚠️ Mutated subscription version is updated check

Following a mutation, the DSS needs to update the subscription version, otherwise it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
If the returned subscription has no version defined, **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)** is not respected.

## ⚠️ Non-implicit subscription has implicit flag set to false check

A subscription that was explicitly created by a client should always have its `implicit_subscription` flag set to false,
otherwise the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
otherwise the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.

## ⚠️ Operational intents notification flag is as requested check

If the subscription was created with the `include_operational_intents` flag set to true, the returned subscription must have the same flag set to true, otherwise the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
If the subscription was created with the `include_operational_intents` flag set to true, the returned subscription must have the same flag set to true, otherwise the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.

## ⚠️ Constraints notification flag is as requested check

If the subscription was created with the `include_constraints` flag set to true, the returned subscription must have the same flag set to true, otherwise the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
If the subscription was created with the `include_constraints` flag set to true, the returned subscription must have the same flag set to true, otherwise the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Validate mutated subscription test step fragment

This test step fragment attempts to validate a single subscription returned by the DSS after its mutation.

The code for these checks lives in the [subscription_validator.py](../../../validators/subscription_validator.py) class.

## ⚠️ Mutated subscription version is updated check

Following a mutation, the DSS needs to update the subscription version, otherwise it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Validate non-mutated subscription test step fragment

This test step fragment attempts to validate a single subscription returned by the DSS after its creation or mutation.

The code for these checks lives in the [subscription_validator.py](../../../validators/subscription_validator.py) class.

## ⚠️ Non-mutated subscription keeps the same version check

If the version of the subscription is updated without there having been any mutation of the subscription, the DSS is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../../../requirements/astm/f3548/v21.md)**.
Loading

0 comments on commit da335eb

Please sign in to comment.