Skip to content

Commit

Permalink
[uss_qualifier] Fix optional resources mock_uss and second_utm_auth (#…
Browse files Browse the repository at this point in the history
…426)

Fix optional resources mock_uss and second_utm_auth
  • Loading branch information
BenjaminPelletier authored Dec 19, 2023
1 parent e61034b commit f76bc50
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion monitoring/uss_qualifier/suites/astm/utm/dss_probing.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions monitoring/uss_qualifier/suites/astm/utm/f3548_21.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand All @@ -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:
Expand All @@ -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
Expand Down
11 changes: 7 additions & 4 deletions monitoring/uss_qualifier/suites/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<custom definition>"
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:
Expand Down

0 comments on commit f76bc50

Please sign in to comment.