Skip to content

Commit 83ac485

Browse files
authored
[uss_qualifier] oir/sub sync: verify secondary DSS instances are clean (#1132)
1 parent afdf9ef commit 83ac485

File tree

4 files changed

+34
-5
lines changed

4 files changed

+34
-5
lines changed

monitoring/uss_qualifier/scenarios/astm/utm/dss/synchronization/op_intent_ref_synchronization.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ are properly propagated to every other DSS instance participating in the deploym
3333

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

36+
### Verify secondary DSS instances are clean test step
37+
38+
#### [Verify secondary DSS contains no operational intents references with a test ID](../fragments/oir/verify_clean_secondary_workspace.md)
39+
3640
## OIR synchronization test case
3741

3842
This test case creates an operational intent reference on the main DSS, and verifies that it is properly synchronized to the other DSS instances.

monitoring/uss_qualifier/scenarios/astm/utm/dss/synchronization/op_intent_ref_synchronization.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,12 @@ def run(self, context: ExecutionContext):
178178
def _setup_case(self):
179179
self.begin_test_case("Setup")
180180
self.begin_test_step("Ensure clean workspace")
181-
self._ensure_clean_workspace_step()
181+
self._ensure_clean_primary_workspace_step()
182182
self.end_test_step()
183+
self._verify_clean_secondaries_step()
183184
self.end_test_case()
184185

185-
def _ensure_clean_workspace_step(self):
186+
def _ensure_clean_primary_workspace_step(self):
186187
# Delete any active OIR we might own
187188
test_step_fragments.cleanup_active_oirs(
188189
self,
@@ -194,6 +195,13 @@ def _ensure_clean_workspace_step(self):
194195
# Make sure the OIR ID we are going to use is available
195196
test_step_fragments.cleanup_op_intent(self, self._dss, self._oir_id)
196197

198+
def _verify_clean_secondaries_step(self):
199+
self.begin_test_step("Verify secondary DSS instances are clean")
200+
for dss in self._dss_read_instances:
201+
test_step_fragments.verify_op_intent_does_not_exist(self, dss, self._oir_id)
202+
203+
self.end_test_step()
204+
197205
def _create_oir_with_params(
198206
self, creation_params: PutOperationalIntentReferenceParameters
199207
):
@@ -578,5 +586,5 @@ def _confirm_secondary_has_no_oir(self, secondary_dss: DSSInstance):
578586

579587
def cleanup(self):
580588
self.begin_cleanup()
581-
self._ensure_clean_workspace_step()
589+
self._ensure_clean_primary_workspace_step()
582590
self.end_cleanup()

monitoring/uss_qualifier/scenarios/astm/utm/dss/synchronization/subscription_synchronization.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ this will be verified at runtime, and the depending checks will not be run if th
5858
This includes the main test subscription used in this test, as well as the extra subscription
5959
used for testing the `manager` field sync, if the test is configured to test for it.
6060

61+
### Verify secondary DSS instances are clean test step
62+
63+
This test step queries all secondary instances to confirm that none of the test IDs that are used in the scenario exist.
64+
65+
#### [Verify secondary DSS contains no Subscriptions with a test ID](../fragments/sub/verify_clean_secondary_workspace.md)
66+
6167
## Subscription Synchronization test case
6268

6369
This test case create a subscription on the main DSS, and verifies that it is properly synchronized to the other DSS instances.

monitoring/uss_qualifier/scenarios/astm/utm/dss/synchronization/subscription_synchronization.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,11 @@ def run(self, context: ExecutionContext):
228228

229229
def _step_setup_case(self):
230230
self.begin_test_case("Setup")
231-
self._ensure_clean_workspace_step()
231+
self._ensure_clean_primary_workspace_step()
232+
self._verify_clean_secondaries_step()
232233
self.end_test_case()
233234

234-
def _ensure_clean_workspace_step(self):
235+
def _ensure_clean_primary_workspace_step(self):
235236
self.begin_test_step("Ensure clean workspace")
236237
# Start by dropping any active sub
237238
self._ensure_no_active_subs_exist()
@@ -255,6 +256,16 @@ def _ensure_no_active_subs_exist(self):
255256
self._planning_area_volume4d,
256257
)
257258

259+
def _verify_clean_secondaries_step(self):
260+
self.begin_test_step("Verify secondary DSS instances are clean")
261+
for dss in self._dss_read_instances:
262+
for sub_id in [self._sub_id] + self._ids_for_deletion:
263+
test_step_fragments.verify_subscription_does_not_exist(
264+
self, dss, sub_id
265+
)
266+
267+
self.end_test_step()
268+
258269
def _step_create_subscriptions(self):
259270
# Create the 'main' test subscription:
260271
self._current_subscription = self._create_sub_with_params(self._sub_params)

0 commit comments

Comments
 (0)