From f76bc50f073b9e70e311b53f66c414452ba2a2d4 Mon Sep 17 00:00:00 2001 From: Benjamin Pelletier Date: Tue, 19 Dec 2023 23:40:08 +0000 Subject: [PATCH] [uss_qualifier] Fix optional resources mock_uss and second_utm_auth (#426) Fix optional resources mock_uss and second_utm_auth --- .../uss_qualifier/suites/astm/utm/dss_probing.yaml | 2 +- .../uss_qualifier/suites/astm/utm/f3548_21.yaml | 6 +++--- monitoring/uss_qualifier/suites/suite.py | 11 +++++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/monitoring/uss_qualifier/suites/astm/utm/dss_probing.yaml b/monitoring/uss_qualifier/suites/astm/utm/dss_probing.yaml index 8127ed7be4..4c11f01588 100644 --- a/monitoring/uss_qualifier/suites/astm/utm/dss_probing.yaml +++ b/monitoring/uss_qualifier/suites/astm/utm/dss_probing.yaml @@ -1,7 +1,7 @@ name: DSS testing for ASTM NetRID F3548-21 resources: dss: resources.astm.f3548.v21.DSSInstanceResource - second_utm_auth: resources.communications.AuthAdapterResource + second_utm_auth: resources.communications.AuthAdapterResource? all_dss_instances: resources.astm.f3548.v21.DSSInstancesResource? flight_intents: resources.flight_planning.FlightIntentsResource id_generator: resources.interuss.IDGeneratorResource diff --git a/monitoring/uss_qualifier/suites/astm/utm/f3548_21.yaml b/monitoring/uss_qualifier/suites/astm/utm/f3548_21.yaml index 0d4e3b7299..6bbc86c5c4 100644 --- a/monitoring/uss_qualifier/suites/astm/utm/f3548_21.yaml +++ b/monitoring/uss_qualifier/suites/astm/utm/f3548_21.yaml @@ -17,7 +17,7 @@ actions: scenario_type: scenarios.astm.utm.PrepareFlightPlanners resources: flight_planners: flight_planners - mock_uss: mock_uss + mock_uss: mock_uss? dss: dss flight_intents: invalid_flight_intents flight_intents2: priority_preemption_flights? @@ -28,7 +28,7 @@ actions: generator_type: action_generators.astm.f3548.ForEachDSS resources: dss_instances: dss_instances - second_utm_auth: second_utm_auth + second_utm_auth: second_utm_auth? flight_intents: non_conflicting_flights id_generator: id_generator specification: @@ -37,7 +37,7 @@ actions: suite_type: suites.astm.utm.dss_probing resources: dss: dss - second_utm_auth: second_utm_auth + second_utm_auth: second_utm_auth? all_dss_instances: dss_instances flight_intents: flight_intents id_generator: id_generator diff --git a/monitoring/uss_qualifier/suites/suite.py b/monitoring/uss_qualifier/suites/suite.py index f8a11bf13b..a3c4696715 100644 --- a/monitoring/uss_qualifier/suites/suite.py +++ b/monitoring/uss_qualifier/suites/suite.py @@ -223,10 +223,13 @@ def __init__( self.declaration = declaration self.definition = TestSuiteDefinition.load_from_declaration(declaration) if "resources" in declaration and declaration.resources: - self.local_resources = { - local_resource_id: resources[parent_resource_id] - for local_resource_id, parent_resource_id in declaration.resources.items() - } + if "suite_type" in declaration and declaration.suite_type: + subject = declaration.suite_type + else: + subject = "" + self.local_resources = make_child_resources( + resources, declaration.resources, f"Test suite {subject}" + ) else: self.local_resources = {} if "local_resources" in self.definition and self.definition.local_resources: