Skip to content

Commit

Permalink
[uss_qualifier/utm/OpIntentValidator] Fix corner-case handling when o…
Browse files Browse the repository at this point in the history
…p intent is expected to not be found (interuss#391)

[uss_qualifier/utm/OpIntentValidator] Skip step if op intent is expected to not be found when there is no original op intent
  • Loading branch information
mickmis authored Dec 8, 2023
1 parent a6e022c commit 4de67d3
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions monitoring/uss_qualifier/scenarios/astm/utm/test_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4de67d3

Please sign in to comment.