Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ are properly propagated to every other DSS instance participating in the deploym

#### [Clean any existing operational intents references with known test IDs](../clean_workspace_op_intents.md)

### Verify secondary DSS instances are clean test step

#### [Verify secondary DSS contains no operational intents references with a test ID](../fragments/oir/verify_clean_secondary_workspace.md)

## OIR synchronization test case

This test case creates an operational intent reference on the main DSS, and verifies that it is properly synchronized to the other DSS instances.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,12 @@ def run(self, context: ExecutionContext):
def _setup_case(self):
self.begin_test_case("Setup")
self.begin_test_step("Ensure clean workspace")
self._ensure_clean_workspace_step()
self._ensure_clean_primary_workspace_step()
self.end_test_step()
self._verify_clean_secondaries_step()
self.end_test_case()

def _ensure_clean_workspace_step(self):
def _ensure_clean_primary_workspace_step(self):
# Delete any active OIR we might own
test_step_fragments.cleanup_active_oirs(
self,
Expand All @@ -194,6 +195,13 @@ def _ensure_clean_workspace_step(self):
# Make sure the OIR ID we are going to use is available
test_step_fragments.cleanup_op_intent(self, self._dss, self._oir_id)

def _verify_clean_secondaries_step(self):
self.begin_test_step("Verify secondary DSS instances are clean")
for dss in self._dss_read_instances:
test_step_fragments.verify_op_intent_does_not_exist(self, dss, self._oir_id)

self.end_test_step()

def _create_oir_with_params(
self, creation_params: PutOperationalIntentReferenceParameters
):
Expand Down Expand Up @@ -578,5 +586,5 @@ def _confirm_secondary_has_no_oir(self, secondary_dss: DSSInstance):

def cleanup(self):
self.begin_cleanup()
self._ensure_clean_workspace_step()
self._ensure_clean_primary_workspace_step()
self.end_cleanup()
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ this will be verified at runtime, and the depending checks will not be run if th
This includes the main test subscription used in this test, as well as the extra subscription
used for testing the `manager` field sync, if the test is configured to test for it.

### Verify secondary DSS instances are clean test step

This test step queries all secondary instances to confirm that none of the test IDs that are used in the scenario exist.

#### [Verify secondary DSS contains no Subscriptions with a test ID](../fragments/sub/verify_clean_secondary_workspace.md)

## Subscription Synchronization test case

This test case create a subscription on the main DSS, and verifies that it is properly synchronized to the other DSS instances.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,11 @@ def run(self, context: ExecutionContext):

def _step_setup_case(self):
self.begin_test_case("Setup")
self._ensure_clean_workspace_step()
self._ensure_clean_primary_workspace_step()
self._verify_clean_secondaries_step()
self.end_test_case()

def _ensure_clean_workspace_step(self):
def _ensure_clean_primary_workspace_step(self):
self.begin_test_step("Ensure clean workspace")
# Start by dropping any active sub
self._ensure_no_active_subs_exist()
Expand All @@ -255,6 +256,16 @@ def _ensure_no_active_subs_exist(self):
self._planning_area_volume4d,
)

def _verify_clean_secondaries_step(self):
self.begin_test_step("Verify secondary DSS instances are clean")
for dss in self._dss_read_instances:
for sub_id in [self._sub_id] + self._ids_for_deletion:
test_step_fragments.verify_subscription_does_not_exist(
self, dss, sub_id
)

self.end_test_step()

def _step_create_subscriptions(self):
# Create the 'main' test subscription:
self._current_subscription = self._create_sub_with_params(self._sub_params)
Expand Down
Loading