Skip to content

Commit

Permalink
Fix previously-hidden bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminPelletier committed Nov 2, 2023
1 parent d20e1d7 commit 10c4362
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
12 changes: 2 additions & 10 deletions monitoring/monitorlib/rid_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,8 @@ def make_volume_4d(
"altitude_lower": make_altitude(alt_lo),
"altitude_upper": make_altitude(alt_hi),
},
**(
{"time_start": StringBasedDateTime(start_time)}
if start_time is not None
else {}
),
**(
{"time_end": StringBasedDateTime(end_time)}
if end_time is not None
else {}
),
**({"time_start": make_time(start_time)} if start_time is not None else {}),
**({"time_end": make_time(end_time)} if end_time is not None else {}),
},
Volume4D,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from monitoring.uss_qualifier.scenarios.astm.netrid.common.dss import utils
from monitoring.uss_qualifier.scenarios.astm.netrid.dss_wrapper import DSSWrapper
from monitoring.uss_qualifier.scenarios.scenario import GenericTestScenario
from monitoring.uss_qualifier.suites.suite import ExecutionContext


class ISASubscriptionInteractions(GenericTestScenario):
Expand Down Expand Up @@ -42,7 +43,7 @@ def __init__(
self._isa_end_time = self._isa.shifted_time_end(now)
self._isa_area = [vertex.as_s2sphere() for vertex in self._isa.footprint]

def run(self):
def run(self, context: ExecutionContext):
self.begin_test_scenario()

self._setup_case()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from monitoring.uss_qualifier.scenarios.scenario import (
GenericTestScenario,
)
from monitoring.uss_qualifier.suites.suite import ExecutionContext

TIME_TOLERANCE_SEC = 1

Expand Down Expand Up @@ -91,7 +92,7 @@ def __init__(
for vertex in problematically_big_area.specification.vertices
]

def run(self):
def run(self, context: ExecutionContext):
self.begin_test_scenario()

loguru.logger.info("setup")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
FlightDataStorageResource,
)
from monitoring.uss_qualifier.scenarios.scenario import TestScenario
from monitoring.uss_qualifier.suites.suite import ExecutionContext


class StoreFlightData(TestScenario):
Expand All @@ -24,7 +25,7 @@ def __init__(
self._flights_data = flights_data
self._storage_config = storage_configuration

def run(self):
def run(self, context: ExecutionContext):
self.begin_test_scenario()
self.record_note(
"Flight count",
Expand All @@ -49,6 +50,10 @@ def run(self):
in self._storage_config.storage_configuration
and self._storage_config.storage_configuration.flight_record_collection_path
):
dirname = os.path.dirname(
self._storage_config.storage_configuration.flight_record_collection_path
)
os.makedirs(dirname, exist_ok=True)
with open(
self._storage_config.storage_configuration.flight_record_collection_path,
"w",
Expand Down

0 comments on commit 10c4362

Please sign in to comment.