From 4d5b95c2d3d7dc93168999576bc08d3d78226565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Misbach?= Date: Thu, 7 Dec 2023 15:57:31 +0100 Subject: [PATCH] [uss_qualifier/utm/OpIntentValidator] Skip step if op intent is expected to not be found when there is no original op intent --- .../scenarios/astm/utm/test_steps.py | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/test_steps.py b/monitoring/uss_qualifier/scenarios/astm/utm/test_steps.py index 29e022085b..2b5aed717b 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/test_steps.py +++ b/monitoring/uss_qualifier/scenarios/astm/utm/test_steps.py @@ -165,14 +165,23 @@ def expect_shared( "Operational intent shared correctly", [self._flight_planner.participant_id] ) as check: if self._orig_oi_ref is None: - # we expect a new op intent to have been created + # We expect a new op intent to have been created. Exception made if skip_if_not_found=True: step is + # skipped. if self._new_oi_ref is None: - check.record_failed( - summary="Operational intent reference not found in DSS", - severity=Severity.High, - details=f"USS {self._flight_planner.participant_id} was supposed to have shared a new operational intent with the DSS, but no matching operational intent references were found in the DSS in the area of the flight intent", - query_timestamps=[self._after_query.request.timestamp], - ) + if not skip_if_not_found: + check.record_failed( + summary="Operational intent reference not found in DSS", + severity=Severity.High, + details=f"USS {self._flight_planner.participant_id} was supposed to have shared a new operational intent with the DSS, but no matching operational intent references were found in the DSS in the area of the flight intent", + query_timestamps=[self._after_query.request.timestamp], + ) + else: + self._scenario.record_note( + f"{self._flight_planner.participant_id} skipped step", + f"No new operational intent was found in DSS, instructed to skip test step '{self._test_step}'.", + ) + self._scenario.end_test_step() + return None oi_ref = self._new_oi_ref elif self._new_oi_ref is None: @@ -223,8 +232,8 @@ def expect_shared( ) else: self._scenario.record_note( - self._flight_planner.participant_id, - f"Operational intent reference with ID {self._orig_oi_ref.id} not found in DSS, instructed to skip test step.", + f"{self._flight_planner.participant_id} skipped step", + f"Operational intent reference with ID {self._orig_oi_ref.id} not found in DSS, instructed to skip test step '{self._test_step}'.", ) self._scenario.end_test_step() return None