Skip to content

Commit

Permalink
[uss_qualifier] scenario config: fix message_signing and validate qua…
Browse files Browse the repository at this point in the history
…lifier run

This PR:
 - introduces a `validation` block to the `message_signing` configuration, so that we may more easily detect errors
 - adds a separate `FlightIntentsResource` that contains conflicting flights that all share the `0` priority
 - use the above new resource to fix `message_signing`, as what is tested by `message_signing` does not support different priorities

Test Plan:
I started by introducing the validation, which correctly detected the failure.

Introducing the new resource then fixed the problem, and a run of `./run_locally.sh configurations.dev.message_signing` then succeeded.
  • Loading branch information
Shastick committed Jun 11, 2024
1 parent 5e5fea6 commit b02d03f
Show file tree
Hide file tree
Showing 3 changed files with 257 additions and 1 deletion.
16 changes: 16 additions & 0 deletions monitoring/uss_qualifier/configurations/dev/library/resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,22 @@ che_invalid_flight_auth_flights:
# Note that $refs are relative to the file with the $ref (this one, in this case)
$ref: file://../../../test_data/che/flight_intents/invalid_flight_auths.yaml

che_conflicting_flights_equal_prio:
# Includes flight intents for equal-priority-not-permitted only situations.
# Use for any scenario testing behavior around conflicts when priorities cannot be specified.
$content_schema: monitoring/uss_qualifier/resources/definitions/ResourceDeclaration.json
resource_type: resources.flight_planning.FlightIntentsResource
specification:
file:
path: file://./test_data/flight_intents/standard/conflicting_flights_equal_prio.yaml
# Note that this hash_sha512 field can be safely deleted if the content changes
hash_sha512: cec5dc8779635ba610f55c4e583a6d6ca4f8d16c4bb9009315f7e0a23e082e3b8df44ba84fcf6f8aea8aa9d685030d20e7e0379933c844281b502dab6c121aa0
transformations:
- relative_translation:
degrees_north: 46.9748
degrees_east: 7.4774
meters_up: 605

che_conflicting_flights:
# Includes flight intents for both equal-priority-not-permitted and higher-priority
$content_schema: monitoring/uss_qualifier/resources/definitions/ResourceDeclaration.json
Expand Down
27 changes: 26 additions & 1 deletion monitoring/uss_qualifier/configurations/dev/message_signing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ v1:
test_run:
resources:
resource_declarations:
che_conflicting_flights: {$ref: 'library/resources.yaml#/che_conflicting_flights'}
che_conflicting_flights: {$ref: 'library/resources.yaml#/che_conflicting_flights_equal_prio'}
che_invalid_flight_intents: {$ref: 'library/resources.yaml#/che_invalid_flight_intents'}
che_non_conflicting_flights: {$ref: 'library/resources.yaml#/che_non_conflicting_flights'}
che_problematically_big_area: {$ref: 'library/resources.yaml#/che_problematically_big_area'}
Expand Down Expand Up @@ -48,6 +48,7 @@ v1:
action:
test_suite:
suite_type: suites.faa.uft.message_signing
# Note: suite cannot currently accept high priority flights.
resources:
mock_uss: mock_uss
flight_planners: flight_planners
Expand All @@ -69,3 +70,27 @@ v1:
artifacts:
raw_report: {}
sequence_view: {}

# This block defines whether to return an error code from the execution of uss_qualifier, based on the content of the
# test run report. All of the criteria must be met to return a successful code.
validation:
criteria:
# applicability indicates which test report elements the pass_condition applies to
- applicability:
# We want to make sure no test scenarios had execution errors
test_scenarios: { }
pass_condition:
each_element:
has_execution_error: false
- applicability:
# We also want to make sure there are no failed checks...
failed_checks:
# ...at least, no failed checks with severity higher than "Low".
has_severity:
higher_than: Low
pass_condition:
# When considering all of the applicable elements...
elements:
# ...the number of applicable elements should be zero.
count:
equal_to: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
$content_schema: monitoring/uss_qualifier/resources/flight_planning/flight_intent/FlightIntentCollection.json
intents:
flight1_planned:
full:
basic_information:
usage_state: Planned
uas_state: Nominal
area:
- outline_polygon:
# There are 0.00000898331 (roughly 0.00001) degrees of latitude (and longitude, at the equator) per meter.
# Therefore, each value below is roughly in meters.
vertices:
- {lng: -0.00015, lat: -0.00020}
- {lng: -0.00015, lat: 0.00010}
- {lng: 0.00050, lat: 0.00010}
- {lng: 0.00055, lat: -0.00025}
altitude_lower:
value: 0.01
reference: W84
units: M
altitude_upper:
value: 30
reference: W84
units: M
start_time:
offset_from:
starting_from:
time_during_test: TimeOfEvaluation
offset: -1s
end_time:
offset_from:
starting_from:
time_during_test: TimeOfEvaluation
offset: 45m

astm_f3548_21:
priority: 0

uspace_flight_authorisation:
$ref: ./flight_auths.yaml#/standard

flight1c_planned:
delta:
source: flight1_planned
mutation:
basic_information:
area:
- outline_polygon:
+vertices:
- {lng: 0.00030, lat: -0.00020}
- {lng: 0.00030, lat: 0.00010}
- {lng: 0.00050, lat: 0.00010}
- {lng: 0.00055, lat: -0.00025}
altitude_lower:
value: -5.04
altitude_upper:
value: 35

flight1c_activated:
delta:
source: flight1c_planned
mutation:
basic_information:
usage_state: InUse
area:
- outline_polygon:
+vertices:
- {lng: 0.00030, lat: -0.00020}
- {lng: 0.00030, lat: 0.00050}
- {lng: 0.00050, lat: 0.00010}
- {lng: 0.00055, lat: -0.00025}
altitude_lower:
value: 0.06

flight1m_planned:
delta:
source: flight1_planned
mutation:
basic_information:
area:
- outline_polygon:
+vertices:
- {lng: 0.00010, lat: -0.00020}
- {lng: 0.00010, lat: 0.00010}
- {lng: 0.00050, lat: 0.00010}
- {lng: 0.00055, lat: -0.00025}
altitude_lower:
value: -30.03

flight2_planned:
full:
basic_information:
usage_state: Planned
uas_state: Nominal
area:
- outline_polygon:
vertices:
- {lng: -0.00020, lat: 0.00020}
- {lng: 0.00000, lat: -0.00025}
- {lng: 0.00020, lat: 0.00015}
- {lng: 0.00000, lat: 0.00050}
altitude_lower:
value: -1.07
reference: W84
units: M
altitude_upper:
value: 28
reference: W84
units: M
start_time:
offset_from:
starting_from:
time_during_test: TimeOfEvaluation
offset: -1s
end_time:
offset_from:
starting_from:
time_during_test: TimeOfEvaluation
offset: 45m

astm_f3548_21:
priority: 0

uspace_flight_authorisation:
$ref: ./flight_auths.yaml#/standard

flight1_activated:
delta:
source: flight1_planned
mutation:
basic_information:
usage_state: InUse
area:
- altitude_lower:
value: 0.02

flight1m_activated:
delta:
source: flight1m_planned
mutation:
basic_information:
usage_state: InUse
area:
- altitude_lower:
value: -30.05

flight2_activated:
delta:
source: flight2_planned
mutation:
basic_information:
usage_state: InUse
area:
- altitude_lower:
value: 0.08

flight2m_activated:
delta:
source: flight2_activated
mutation:
basic_information:
area:
- outline_polygon:
+vertices:
- {lng: -0.00020, lat: 0.00020}
- {lng: 0.00040, lat: 0.00015}
- {lng: 0.00000, lat: 0.00050}
altitude_lower:
value: -3.09
altitude_upper:
value: 50

equal_prio_flight2m_planned:
delta:
source: flight2m_activated
mutation:
basic_information:
usage_state: Planned
area:
- altitude_lower:
value: 45.13
astm_f3548_21:
priority: 0

equal_prio_flight2_planned:
delta:
source: flight2_activated
mutation:
basic_information:
usage_state: Planned
area:
- altitude_lower:
value: 0.10
astm_f3548_21:
priority: 0

equal_prio_flight2_activated:
delta:
source: equal_prio_flight2_planned
mutation:
basic_information:
usage_state: InUse
area:
- altitude_lower:
value: 0.11

equal_prio_flight2_nonconforming:
delta:
source: equal_prio_flight2_activated
mutation:
basic_information:
uas_state: OffNominal
area:
- altitude_lower:
value: 0.12

0 comments on commit b02d03f

Please sign in to comment.