Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[uss_qualifier] oir_simple: accepted oir can be detached from explicit subscription #805

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion monitoring/prober/infrastructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def wrapper_default_scope(*args, **kwargs):
resource_type_code_descriptions: Dict[ResourceType, str] = {}


# Next code: 398
# Next code: 400
def register_resource_type(code: int, description: str) -> ResourceType:
"""Register that the specified code refers to the described resource.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# OIR is attached to expected subscription test step fragment

## [Query Success](./crud/read_query.md)

Check query succeeds

## 🛑 OIR is attached to expected subscription check

If the OIR returned by the DSS under test is not attached to the expected subscription,
it is in violation of **[astm.f3548.v21.DSS0005,1](../../../../../../requirements/astm/f3548/v21.md)**

## [Get referenced Subscription](../sub/crud/read_query.md)

Attempt to fetch the subscription referenced by the OIR in order to confirm that it does not exist.

This is only used in circumstances where the subscription is expected to not exist and the DSS implementation
is not using the _null_ subscription ID with value `00000000-0000-4000-8000-000000000000`.
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,137 @@ Verifies the behavior of a DSS for simple interactions pertaining to operational

This step ensures that no entities with the known test IDs exists in the DSS.

## OIR in ACCEPTED state can be created without subscription test case

Checks that a DSS allows an OIR to be created in the accepted state without any subscription.

### [Create an operational intent reference test step](./fragments/oir/crud/create_query.md)

This step verifies that an OIR can be created in the ACCEPTED state without providing any subscription information (implicit or explicit) in the request.

### [OIR is not attached to any subscription test step](./fragments/oir/oir_has_expected_subscription.md)

This step verifies that the OIR is not attached to any subscription.

#### 🛑 Referenced subscription does not exist check

If the placeholder subscription contained in the OIR returned to the qualifier by the DSS references an existing subscription,
then the DSS under test is in violation of **[astm.f3548.v21.DSS0005,1](../../../../requirements/astm/f3548/v21.md)**, as the creation request
did not specify any subscription.

## Validate explicit subscription being attached to OIR without subscription test case

Ensures that an explicit subscription can be attached to an OIR without subscription attached, and that the subscription is required to properly cover the OIR.

### [Create a subscription test step](./fragments/sub/crud/create_query.md)

Create an explicit subscription to be used in this test cases.

### Attempt to attach insufficient subscription to OIR test step

This step verifies that the DSS refuses the request to attach an insufficient subscription to an OIR that currently has no subscription.

#### 🛑 Request to attach insufficient subscription to OIR fails check

If the DSS under test allows the qualifier to attach an insufficient explicit subscription to a subscription-free OIR,
it is in violation of **[astm.f3548.v21.DSS0005,1](../../../../requirements/astm/f3548/v21.md)**

### [OIR is not attached to any subscription test step](./fragments/oir/oir_has_expected_subscription.md)

This step verifies that the OIR is not attached to any subscription.

### [Attach explicit subscription to OIR test step](./fragments/oir/crud/update_query.md)

This step verifies that an explicit subscription covering the OIR can be attached to an OIR that currently has no subscription.

### [OIR is attached to expected subscription test step](./fragments/oir/oir_has_expected_subscription.md)

This step verifies that the OIR is attached to the subscription provided upon creation.

## Validate explicit subscription on OIR creation test case

Ensures that the explicit subscription provided upon creation of an OIR is properly validated and attached to the OIR.

### [Ensure clean workspace test step](./clean_workspace.md)

This step ensures that no entities with the known test IDs exists in the DSS.

### [Create a subscription test step](./fragments/sub/crud/create_query.md)

Create an explicit subscription to be used in this and the following test cases.

### Provide subscription not covering extent of OIR being created test step

This step verifies that an OIR cannot be created when an explicit subscription that does not cover the extent of the OIR is specified.

#### 🛑 Request to create OIR with incorrect subscription fails check

If the DSS under test allows the qualifier to create an OIR with an explicit subscription that does not cover the extent of the OIR,
it is in violation of **[astm.f3548.v21.DSS0005,1](../../../../requirements/astm/f3548/v21.md)**

### [Create an operational intent reference test step](./fragments/oir/crud/create_query.md)

Create an operational intent reference to be used in this scenario.
When the provided subscription covers the extent of the OIR, the OIR can be created.

### [OIR is attached to expected subscription test step](./fragments/oir/oir_has_expected_subscription.md)

This step verifies that the OIR is attached to the subscription provided upon creation.

## Validate explicit subscription upon subscription replacement test case

Ensures that when the explicit subscription tied to an OIR is replaced with another explicit subscription,
this subscription is properly validated and attached to the OIR.

### [Create a subscription test step](./fragments/sub/crud/create_query.md)

Create an additional explicit subscription to be used in this test case.

### Attempt to replace OIR's existing explicit subscription with an insufficient one test step

This step verifies that an OIR's existing explicit subscription cannot be replaced with an explicit subscription that does not cover the extent of the OIR.

#### 🛑 Request to mutate OIR while providing an incorrect subscription fails check

If the DSS under test allows the qualifier to replace an OIR's existing explicit subscription with an explicit subscription that does not cover the extent of the OIR,
it is in violation of **[astm.f3548.v21.DSS0005,1](../../../../requirements/astm/f3548/v21.md)**

### [OIR is attached to expected subscription test step](./fragments/oir/oir_has_expected_subscription.md)

This step verifies that the OIR is still attached to the previous, valid, subscription.

### [Replace the OIR's explicit subscription test step](./fragments/oir/crud/update_query.md)

This step verifies that an OIR attached to an explicit subscription can be mutated in order to be attached
to another explicit subscription that properly covers the extent of the OIR.

### [OIR is attached to expected subscription test step](./fragments/oir/oir_has_expected_subscription.md)

This step verifies that the OIR is attached to the subscription provided upon mutation.

## Remove explicit subscription from OIR test case

Checks that an OIR in the ACCEPTED state that is attached to an explicit subscription can be mutated in order to not be attached to any subscription.

### [Remove explicit subscription from OIR test step](./fragments/oir/crud/update_query.md)

This step verifies that an OIR attached to an explicit subscription can be mutated in order to not be attached to any subscription.

### [OIR is not attached to any subscription test step](./fragments/oir/oir_has_expected_subscription.md)

This step verifies that the OIR is not attached to any subscription.

## Deletion requires correct OVN test case

Ensures that a DSS will only delete OIRs when the correct OVN is presented.

### [Ensure clean workspace test step](./clean_workspace.md)

This step resets the workspace for the present and following test cases by ensuring that no entities with the known test IDs exists in the DSS.

### [Create an operational intent reference test step](./fragments/oir/crud/create_query.md)

Create an operational intent reference to be used in this and the following test cases.

### Attempt deletion with missing OVN test step

This step verifies that an existing OIR cannot be deleted with a missing OVN.
Expand Down
Loading
Loading