From 4f1aa9821338523402ae16226fe955885385d867 Mon Sep 17 00:00:00 2001 From: Benjamin Pelletier Date: Mon, 18 Dec 2023 23:37:27 +0000 Subject: [PATCH] Clean up interaction search and severities --- .../get_op_data_validation.md | 10 +- .../get_op_data_validation.py | 109 ++++++--- .../expected_interactions_test_steps.py | 206 +++++++----------- .../plan_flight_intent_expect_failed.md | 2 +- .../test_steps/query_mock_uss_interactions.md | 8 + .../validate_get_operational_intent.md | 4 +- ...date_no_notification_operational_intent.md | 4 +- ...alidate_notification_operational_intent.md | 10 +- ...l_intent_but_with_invalid_interuss_data.md | 8 +- 9 files changed, 174 insertions(+), 187 deletions(-) create mode 100644 monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/query_mock_uss_interactions.md diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/get_op_data_validation.md b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/get_op_data_validation.md index 0a281850ba..aaf73723c7 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/get_op_data_validation.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/get_op_data_validation.md @@ -46,8 +46,9 @@ Validate flight 1 is planned. In the following test step, we want to assert that tested_uss must have retrieved operational intent details from mock_uss via a GET request. This assertion is only valid, however, if tested_uss did not obtain the operational intent details in a different way -- specifically, a notification due to a pre-existing subscription. In this test -step, we determine if tested_uss had a pre-existing subscription by checking if mock_uss sent a notification to -tested_uss. +step, we determine if tested_uss had a pre-existing subscription by: + +#### [checking if mock_uss sent a notification to tested_uss](test_steps/query_mock_uss_interactions.md) ### [Validate flight2 GET interaction, if no notification test step](test_steps/validate_get_operational_intent.md) This step is skipped if a notification to tested_uss was found in the previous step. @@ -80,8 +81,9 @@ Validate flight 1 is not shared with DSS, as plan failed. In the following test step, we want to assert that tested_uss must have retrieved operational intent details from mock_uss via a GET request. This assertion is only valid, however, if tested_uss did not obtain the operational intent details in a different way -- specifically, a notification due to a pre-existing subscription. In this test -step, we determine if tested_uss had a pre-existing subscription by checking if mock_uss sent a notification to -tested_uss. +step, we determine if tested_uss had a pre-existing subscription by: + +#### [checking if mock_uss sent a notification to tested_uss](test_steps/query_mock_uss_interactions.md) ### [Validate flight2 GET interaction, if no notification test step](test_steps/validate_get_operational_intent.md) This step is skipped if a notification to tested_uss was found in the previous step. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/get_op_data_validation.py b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/get_op_data_validation.py index ebe9592e22..29c5fa86f6 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/get_op_data_validation.py +++ b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/get_op_data_validation.py @@ -7,6 +7,7 @@ from monitoring.monitorlib.clients.flight_planning.flight_info_template import ( FlightInfoTemplate, ) +from monitoring.monitorlib.clients.mock_uss.interactions import QueryDirection from monitoring.monitorlib.temporal import TimeDuringTest import arrow from monitoring.monitorlib.temporal import Time @@ -40,10 +41,10 @@ OpIntentValidationFailureType, ) from monitoring.uss_qualifier.scenarios.astm.utm.data_exchange_validation.test_steps.expected_interactions_test_steps import ( - expect_interuss_post_interactions, - expect_get_requests_to_mock_uss_when_no_notification, expect_no_interuss_post_interactions, - check_any_notification, + expect_mock_uss_receives_op_intent_notification, + mock_uss_interactions, + is_op_intent_notification_with_id, ) from monitoring.monitorlib.clients.mock_uss.mock_uss_scd_injection_api import ( MockUssFlightBehavior, @@ -58,6 +59,7 @@ delete_flight, ) from monitoring.uss_qualifier.suites.suite import ExecutionContext +from uas_standards.astm.f3548.v21.api import OperationID class GetOpResponseDataValidationByUSS(TestScenario): @@ -168,6 +170,7 @@ def _plan_successfully_test_case(self, times: Dict[TimeDuringTest, Time]): self._intents_extent, ) as validator: self.begin_test_step("mock_uss plans flight 2") + flight_2_planning_time = Time(arrow.utcnow().datetime) _, self.flight_2_id = plan_flight( self, self.mock_uss_client, @@ -188,7 +191,7 @@ def _plan_successfully_test_case(self, times: Dict[TimeDuringTest, Time]): self._intents_extent, ) as validator: self.begin_test_step("tested_uss plans flight 1") - planning_time = Time(arrow.utcnow().datetime) + flight_1_planning_time = Time(arrow.utcnow().datetime) plan_res, self.flight_1_id = plan_flight( self, self.tested_uss_client, @@ -202,31 +205,48 @@ def _plan_successfully_test_case(self, times: Dict[TimeDuringTest, Time]): self.begin_test_step( "Check for notification to tested_uss due to subscription in flight 2 area" ) - tested_uss_notified = check_any_notification( - self, - self.mock_uss, - planning_time, + tested_uss_notifications, _ = mock_uss_interactions( + scenario=self, + mock_uss=self.mock_uss, + op_id=OperationID.NotifyOperationalIntentDetailsChanged, + direction=QueryDirection.Outgoing, + since=flight_2_planning_time, + is_applicable=is_op_intent_notification_with_id(flight_2_oi_ref.id), ) self.end_test_step() self.begin_test_step("Validate flight2 GET interaction, if no notification") - if not tested_uss_notified: - expect_get_requests_to_mock_uss_when_no_notification( - self, - self.mock_uss, - planning_time, - self.mock_uss.base_url, - flight_2_oi_ref.id, - self.tested_uss_client.participant_id, + if not tested_uss_notifications: + tested_uss_get_requests, query = mock_uss_interactions( + scenario=self, + mock_uss=self.mock_uss, + op_id=OperationID.GetOperationalIntentDetails, + direction=QueryDirection.Incoming, + since=flight_1_planning_time, + query_params={"entity_id": flight_2_oi_ref.id}, + ) + with self.check( + "Expect GET request when no notification", + [self.tested_uss_client.participant_id], + ) as check: + if not tested_uss_get_requests: + check.record_failed( + summary=f"mock_uss did not GET op intent details when planning", + details=f"mock_uss did not receive a request to GET operational intent details for operational intent {flight_2_oi_ref.id}. tested_uss was not sent a notification with the operational intent details, so they should have requested the operational intent details during planning.", + query_timestamps=[query.request.timestamp], + ) + else: + self.record_note( + "No flight 2a GET expected reason", + f"Notifications found to {', '.join(n.query.request.url for n in tested_uss_notifications)}", ) self.end_test_step() self.begin_test_step("Validate flight1 Notification sent to mock_uss") - expect_interuss_post_interactions( + expect_mock_uss_receives_op_intent_notification( self, self.mock_uss, - planning_time, - self.mock_uss.base_url, + flight_1_planning_time, self.tested_uss_client.participant_id, plan_res.queries[0].request.timestamp, ) @@ -266,6 +286,7 @@ def _plan_unsuccessfully_test_case(self, times: Dict[TimeDuringTest, Time]): self.begin_test_step( "mock_uss plans flight 2, sharing invalid operational intent data" ) + flight_2_planning_time = Time(arrow.utcnow().datetime) _, self.flight_2_id = plan_flight( self, self.mock_uss_client, @@ -289,7 +310,7 @@ def _plan_unsuccessfully_test_case(self, times: Dict[TimeDuringTest, Time]): self._intents_extent, ) as validator: self.begin_test_step("tested_uss attempts to plan flight 1, expect failure") - planning_time = Time(arrow.utcnow().datetime) + flight_1_planning_time = Time(arrow.utcnow().datetime) _, self.flight_1_id = plan_flight_intent_expect_failed( self, self.tested_uss_client, @@ -301,30 +322,48 @@ def _plan_unsuccessfully_test_case(self, times: Dict[TimeDuringTest, Time]): self.begin_test_step( "Check for notification to tested_uss due to subscription in flight 2 area" ) - tested_uss_notified = check_any_notification( - self, - self.mock_uss, - planning_time, + tested_uss_notifications, _ = mock_uss_interactions( + scenario=self, + mock_uss=self.mock_uss, + op_id=OperationID.NotifyOperationalIntentDetailsChanged, + direction=QueryDirection.Outgoing, + since=flight_2_planning_time, + is_applicable=is_op_intent_notification_with_id(flight_2_oi_ref.id), ) self.end_test_step() - if not tested_uss_notified: - self.begin_test_step("Validate flight2 GET interaction, if no notification") - expect_get_requests_to_mock_uss_when_no_notification( - self, - self.mock_uss, - planning_time, - self.mock_uss.base_url, - flight_2_oi_ref.id, - self.tested_uss_client.participant_id, + self.begin_test_step("Validate flight2 GET interaction, if no notification") + if not tested_uss_notifications: + tested_uss_get_requests, query = mock_uss_interactions( + scenario=self, + mock_uss=self.mock_uss, + op_id=OperationID.GetOperationalIntentDetails, + direction=QueryDirection.Incoming, + since=flight_1_planning_time, + query_params={"entity_id": flight_2_oi_ref.id}, ) - self.end_test_step() + with self.check( + "Expect GET request when no notification", + [self.tested_uss_client.participant_id], + ) as check: + if not tested_uss_get_requests: + check.record_failed( + summary=f"mock_uss did not GET op intent details when planning", + details=f"mock_uss did not receive a request to GET operational intent details for operational intent {flight_2_oi_ref.id}. tested_uss was not sent a notification with the operational intent details, so they should have requested the operational intent details during planning.", + query_timestamps=[query.request.timestamp], + ) + else: + self.record_note( + "No flight 2b GET expected reason", + f"Notifications found to {', '.join(n.query.request.url for n in tested_uss_notifications)}", + ) + self.end_test_step() self.begin_test_step("Validate flight 1 Notification not sent to mock_uss") expect_no_interuss_post_interactions( self, self.mock_uss, - planning_time, + flight_1_planning_time, self.tested_uss_client.participant_id, ) self.end_test_step() diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/expected_interactions_test_steps.py b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/expected_interactions_test_steps.py index a790f822d0..1ff8828678 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/expected_interactions_test_steps.py +++ b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/expected_interactions_test_steps.py @@ -1,39 +1,42 @@ from __future__ import annotations import datetime +import re from typing import List, Tuple, Optional import time -from monitoring.monitorlib.fetch import QueryError, Query -from monitoring.uss_qualifier.common_data_definitions import Severity -from monitoring.uss_qualifier.scenarios.scenario import TestScenarioType -from monitoring.uss_qualifier.resources.interuss.mock_uss.client import MockUSSClient from implicitdict import StringBasedDateTime from loguru import logger +from uas_standards.astm.f3548.v21 import api +from uas_standards.astm.f3548.v21.api import OperationID + from monitoring.monitorlib.clients.mock_uss.interactions import Interaction +from monitoring.monitorlib.clients.mock_uss.interactions import QueryDirection +from monitoring.monitorlib.fetch import QueryError, Query +from monitoring.uss_qualifier.common_data_definitions import Severity +from monitoring.uss_qualifier.resources.interuss.mock_uss.client import MockUSSClient from monitoring.uss_qualifier.scenarios.astm.utm.data_exchange_validation.test_steps.constants import ( MaxTimeToWaitForSubscriptionNotificationSeconds as max_wait_time, ) +from monitoring.uss_qualifier.scenarios.scenario import TestScenarioType # Interval to wait for checking notification received WAIT_INTERVAL = 1 -def expect_interuss_post_interactions( +def expect_mock_uss_receives_op_intent_notification( scenario: TestScenarioType, mock_uss: MockUSSClient, st: StringBasedDateTime, - posted_to_url: str, participant_id: str, plan_request_time: datetime.datetime, ): - """ - This step checks if a notification was sent to a subscribed USS, from time 'st' to now + """This step checks if a notification is sent to mock_uss within the required time window. + Args: - posted_to_url: url of the subscribed USS + st: the earliest time a notification may have been sent participant_id: id of the participant responsible to send the notification plan_request_time: timestamp of the flight plan query that would lead to sending notification - """ # Check for 'notification found' will be done periodically by waiting for a duration till max_wait_time @@ -41,12 +44,13 @@ def expect_interuss_post_interactions( duration = 0 while time_waited <= max_wait_time: time.sleep(duration) - interactions, query = _get_interuss_interactions_with_check( - scenario, - mock_uss, - st, + found, query = mock_uss_interactions( + scenario=scenario, + mock_uss=mock_uss, + op_id=OperationID.NotifyOperationalIntentDetailsChanged, + direction=QueryDirection.Incoming, + since=st, ) - found = _any_oi_notification_in_interactions(interactions, posted_to_url) time_waited += duration if found: logger.debug(f"Waited for {time_waited} to check notifications.") @@ -57,9 +61,8 @@ def expect_interuss_post_interactions( with scenario.check("Expect Notification sent", [participant_id]) as check: if not found: check.record_failed( - summary=f"Notification to {posted_to_url} not sent", - severity=Severity.Medium, - details=f"Notification to {posted_to_url} not sent even though DSS instructed the planning USS to notify due to subscription.", + summary=f"Notification not sent", + details=f"Notification to USS with pre-existing relevant operational intent not sent even though DSS instructed the planning USS to notify due to subscription.", query_timestamps=[plan_request_time, query.request.timestamp], ) @@ -70,153 +73,90 @@ def expect_no_interuss_post_interactions( st: StringBasedDateTime, participant_id: str, ): - """ - This step checks no notification was sent to any USS as no DSS entity was created, from time 'st' to now + """This step checks no notification is sent to any USS within the required time window (as no DSS entity was created). + Args: + st: the earliest time a notification may have been sent participant_id: id of the participant responsible to send the notification """ # Wait for next MaxTimeToWaitForSubscriptionNotificationSeconds duration to capture any notification time.sleep(max_wait_time) - interactions, query = _get_interuss_interactions_with_check( - scenario, - mock_uss, - st, + found, query = mock_uss_interactions( + scenario=scenario, + mock_uss=mock_uss, + op_id=OperationID.NotifyOperationalIntentDetailsChanged, + direction=QueryDirection.Incoming, + since=st, ) - found = _any_oi_notification_in_interactions(interactions) with scenario.check("Expect Notification not sent", [participant_id]) as check: if found: check.record_failed( summary=f"Notification was wrongly sent for an entity not created.", - severity=Severity.Medium, details=f"Notification was wrongly sent for an entity not created.", query_timestamps=[query.request.timestamp], ) -def expect_get_requests_to_mock_uss_when_no_notification( +def mock_uss_interactions( scenario: TestScenarioType, mock_uss: MockUSSClient, - st: StringBasedDateTime, - mock_uss_base_url: str, - id: str, - participant_id: str, -): - """ - This step checks a GET request was made to mock_uss for an existing entity, from time 'st' to now - Args: - mock_uss_base_url: url of the mock_uss that is managing the entity - id: entity id - participant_id: id of the participant responsible to send GET request - - """ - interactions, query = _get_interuss_interactions_with_check(scenario, mock_uss, st) - logger.debug(f"Checking for GET request to {mock_uss_base_url} for id {id}") - get_requested = False - for interaction in interactions: - method = interaction.query.request.method - url = interaction.query.request.url - if method == "GET" and url.startswith(mock_uss_base_url) and id in url: - get_requested = True - break - if not get_requested: - with scenario.check( - "Expect GET request when no notification", [participant_id] - ) as check: - check.record_failed( - summary=f"No GET request received at {mock_uss_base_url} for {id} ", - severity=Severity.High, - details=f"No GET request received at {mock_uss_base_url} for {id}. A planning USS in the area should have sent a reques to get the intent details.", - query_timestamps=[query.request.timestamp], - ) - - -def _get_interuss_interactions_with_check( - scenario: TestScenarioType, - mock_uss: MockUSSClient, - st: StringBasedDateTime, + op_id: OperationID, + direction: QueryDirection, + since: StringBasedDateTime, + query_params: Optional[Dict[str, str]] = None, + is_applicable: Optional[Callable[[Interaction], bool]] = None, ) -> Tuple[List[Interaction], Query]: - """ - Method to get interuss interactions with a scenario check from mock_uss from time 'st' to now. - """ + """Determine if mock_uss recorded an interaction for the specified operation in the specified direction.""" + with scenario.check( "MockUSS interactions request", [mock_uss.participant_id] ) as check: try: - interactions, query = _get_interuss_interactions( - mock_uss, - st, - ) + interactions, query = mock_uss.get_interactions(since) scenario.record_query(query) - return interactions, query except QueryError as e: for q in e.queries: scenario.record_query(q) check.record_failed( summary=f"Error from mock_uss when attempting to get interactions from_time {st}", - severity=Severity.High, details=f"{str(e)}\n\nStack trace:\n{e.stacktrace}", query_timestamps=[q.request.timestamp for q in e.queries], ) + op = api.OPERATIONS[op_id] -def _get_interuss_interactions( - mock_uss: MockUSSClient, - st: StringBasedDateTime, -) -> Tuple[List[Interaction], Query]: - """ - Method to get interuss interactions from mock_uss from time 'st' to now. - """ - all_interactions, query = mock_uss.get_interactions(st) - exclude_sub = mock_uss.session.auth_adapter.get_sub() - - def is_uss_interaction(interaction: Interaction, excl_sub: str) -> bool: - sub = interaction.query.get_client_sub() - if sub: - if sub == excl_sub: - return False - else: - return True - else: - logger.error(f"Interaction received without Authorization : {interaction}") - return False - - interuss_interactions = [] - for interaction in all_interactions: - if is_uss_interaction(interaction, exclude_sub): - interuss_interactions.append(interaction) - - return interuss_interactions, query + op_path = op.path + if query_params is None: + query_params = {} + for m in re.findall(r"\{[^}]+\}", op_path): + param_name = m[1:-1] + op_path = op_path.replace(m, query_params.get(param_name, r"[^/]+")) - -def check_any_notification( - scenario: TestScenarioType, - mock_uss: MockUSSClient, - st: StringBasedDateTime, -) -> bool: - """ - This method helps check any notification have been sent, to or from mock_uss. - - Returns: True if any notification found, otherwise False - """ - interactions, query = _get_interuss_interactions( - mock_uss, - st, - ) - scenario.record_query(query) - return _any_oi_notification_in_interactions(interactions) - - -def _any_oi_notification_in_interactions( - interactions: List[Interaction], recipient_base_url: Optional[str] = None -) -> bool: - """ - Checks if there is any POST request made to 'recipient_base_url', and returns True if found. - If 'recipient_base_url' is None, any POST request found returns True. - """ + if is_applicable is None: + is_applicable = lambda i: True + result = [] for interaction in interactions: - method = interaction.query.request.method - url = interaction.query.request.url - if method == "POST": - if recipient_base_url is None or url.startswith(recipient_base_url): - return True - return False + if ( + interaction.direction == direction + and interaction.query.request.method == op.verb + and re.search(op_path, interaction.query.request.url) + and is_applicable(interaction) + ): + result.append(interaction) + return result, query + + +def is_op_intent_notification_with_id( + op_intent_id: EntityID, +) -> Callable[[Interaction], bool]: + """Returns an `is_applicable` function that detects whether an op intent notification refers to the specified operational intent.""" + + def is_applicable(interaction: Interaction) -> bool: + if "json" in interaction.query.request and interaction.query.request.json: + return ( + interaction.query.request.json.get("operational_intent_id", None) + == op_intent_id + ) + return False + + return is_applicable diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/plan_flight_intent_expect_failed.md b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/plan_flight_intent_expect_failed.md index 7afaa7b24a..8d053af834 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/plan_flight_intent_expect_failed.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/plan_flight_intent_expect_failed.md @@ -2,7 +2,7 @@ This page describes the content of a common test case where a valid user flight intent fails in a flight planner, because of invalid data shared for a nearby flight shared by another USS. See `plan_flight_intent_expect_failed` in invalid_op_test_steps.py. -## Plan should fail check +## 🛑 Plan should fail check A USS shouldn't go ahead and plan if it doesn't have accurate information. As per SCD0035 a USS needs to verify a particular conflict status. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/query_mock_uss_interactions.md b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/query_mock_uss_interactions.md new file mode 100644 index 0000000000..26862c3f8e --- /dev/null +++ b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/query_mock_uss_interactions.md @@ -0,0 +1,8 @@ +# Query mock_uss interactions test step fragment + +This step obtains interactions of interest from mock_uss. + +## 🛑 MockUSS interactions request check + +If the query to mock_uss fails or uss_qualifier is otherwise unable to retrieve the interactions of interest, the mock_uss provider does not meet +**[interuss.mock_uss.hosted_instance.ExposeInterface](../../../../../requirements/interuss/mock_uss/hosted_instance.md)**. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_get_operational_intent.md b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_get_operational_intent.md index 82e6c5c709..88909a995b 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_get_operational_intent.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_get_operational_intent.md @@ -2,9 +2,9 @@ This step verifies that a USS makes a GET request to get the intent_details of an existing operation when needed as per ASTM F3548-21 by checking the interuss interactions of mock uss -## MockUSS interactions request check +## 🛑 MockUSS interactions request check **[interuss.mock_uss.hosted_instance.ExposeInterface](../../../../../requirements/interuss/mock_uss/hosted_instance.md)**. -## Expect GET request when no notification check +## 🛑 Expect GET request when no notification check **[astm.f3548.v21.SCD0035](../../../../../requirements/astm/f3548/v21.md)** SCD0035 needs a USS to verify before transitioning to Accepted that it does not conflict with a type of operational intent, and the only way to have verified this is by knowing all operational intent details, and (from previous checks of no notifications) the only way to know the operational intent details of flight is to have requested them via a GET details interaction. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_no_notification_operational_intent.md b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_no_notification_operational_intent.md index d05c766676..3a7127a5a8 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_no_notification_operational_intent.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_no_notification_operational_intent.md @@ -2,10 +2,10 @@ This step verifies when a flight is not created, it is also not notified by checking the interuss interactions of mock_uss instance. -## MockUSS interactions request check +## 🛑 MockUSS interactions request check **[interuss.mock_uss.hosted_instance.ExposeInterface](../../../../../requirements/interuss/mock_uss/hosted_instance.md)**. -## Expect Notification not sent check +## 🛑 Expect Notification not sent check **[interuss.f3548.notification_requirements.NoDssEntityNoNotification](../../../../../requirements/interuss/f3548/notification_requirements.md)** diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_notification_operational_intent.md b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_notification_operational_intent.md index e95c6b2a2a..f43e81e86e 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_notification_operational_intent.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_notification_operational_intent.md @@ -2,10 +2,10 @@ This step verifies that, when creating or modifying an operational intent, a USS sent the required notification for a relevant subscription owned by a mock_uss instance by checking the interactions of that mock_uss instance. -## MockUSS interactions request check +## 🛑 MockUSS interactions request check **[interuss.mock_uss.hosted_instance.ExposeInterface](../../../../../requirements/interuss/mock_uss/hosted_instance.md)**. -## Expect Notification sent check +## ⚠️ Expect Notification sent check As per **[astm.f3548.v21.SCD0085](../../../../../requirements/astm/f3548/v21.md)**, the notification should be sent by a USS about its operational intent to the subscribing USS in no more than MaxRespondToSubscriptionNotification (5) seconds, 95 percent of the time. @@ -18,7 +18,7 @@ with 95 percentile at 5 seconds, then with the standard deviation of 3.04, we ge Hence, for test cases that check notification sent for an operational intent, we will wait for notifications till threshold [MaxTimeToWaitForSubscriptionNotificationSeconds](./constants.py) (rounding to 7 seconds). -####Note - +#### Note As per **[astm.f3548.v21.SCD0085](../../../../../requirements/astm/f3548/v21.md)**, MaxRespondToSubscriptionNotification is measured from time_start - Receipt of subscription notification from DSS - till time_end - Entity details sent to subscribing USS. @@ -39,7 +39,5 @@ So, it starts waiting from a point of time after the t_time_start that is t1. This ensures that test driver waits for a long enough duration before getting the interactions. Hence, we get a high confidence that the test driver correctly verifies if a notification was sent by tested_uss. - - -## Notification data is valid check +## 🛑 Notification data is valid check **[astm.f3548.v21.SCD0085](../../../../../requirements/astm/f3548/v21.md)** diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_sharing_operational_intent_but_with_invalid_interuss_data.md b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_sharing_operational_intent_but_with_invalid_interuss_data.md index 46b70a3e15..12f4ce1496 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_sharing_operational_intent_but_with_invalid_interuss_data.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_sharing_operational_intent_but_with_invalid_interuss_data.md @@ -2,19 +2,19 @@ This step verifies that a created flight is shared properly per ASTM F3548-21 by querying the DSS for flights in the area of the flight intent, and then retrieving the details from the USS if the operational intent reference is found. See `expect_shared_with_invalid_data` in invalid_op_test_steps.py. -## DSS responses check +## 🛑 DSS responses check **[astm.f3548.v21.DSS0005](../../../../../requirements/astm/f3548/v21.md)** -## Operational intent shared correctly check +## 🛑 Operational intent shared correctly check If a reference to the operational intent for the flight is not found in the DSS, this check will fail per **[astm.f3548.v21.USS0005](../../../../../requirements/astm/f3548/v21.md)** and **[astm.f3548.v21.OPIN0025](../../../../../requirements/astm/f3548/v21.md)**. -## Operational intent details retrievable check +## 🛑 Operational intent details retrievable check If the operational intent details for the flight cannot be retrieved from the USS, this check will fail per **[astm.f3548.v21.USS0105](../../../../../requirements/astm/f3548/v21.md)** and **[astm.f3548.v21.OPIN0025](../../../../../requirements/astm/f3548/v21.md)**. -## Invalid data in Operational intent details shared by Mock USS for negative test check +## 🛑 Invalid data in Operational intent details shared by Mock USS for negative test check **[interuss.mock_uss.hosted_instance.ExposeInterface](../../../../../requirements/interuss/mock_uss/hosted_instance.md)**.