Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,13 @@ def run(self, context: ExecutionContext):

self.begin_test_step("Invalid search area")
self._poll_during_flights(
[
self._rid_version.max_diagonal_km * 1000
- 100, # valid diagonal required for sps urls discovery
],
self._evaluate_and_test_too_large_area_requests,
dict(),
)
self.end_test_step()

self.begin_test_step("Unauthenticated requests")
self._poll_during_flights(
[
self._rid_version.max_diagonal_km * 1000 + 500, # too large
self._rid_version.max_diagonal_km * 1000 - 100, # clustered
self._rid_version.max_details_diagonal_km * 1000 - 100, # details
],
self._evaluate_and_test_authentication,
{
"auth": auth.NoAuth(aud_override=""),
Expand All @@ -112,11 +103,6 @@ def run(self, context: ExecutionContext):

self.begin_test_step("Incorrectly authenticated requests")
self._poll_during_flights(
[
self._rid_version.max_diagonal_km * 1000 + 500, # too large
self._rid_version.max_diagonal_km * 1000 - 100, # clustered
self._rid_version.max_details_diagonal_km * 1000 - 100, # details
],
self._evaluate_and_test_authentication,
{
"auth": auth.InvalidTokenSignatureAuth(),
Expand All @@ -136,7 +122,6 @@ def _inject_flights(self):

def _poll_during_flights(
self,
diagonals_m: list[float],
evaluation_func: Callable[
[LatLngRect, Unpack[dict[str, auth.AuthAdapter | str]]], set[str]
],
Expand All @@ -145,7 +130,6 @@ def _poll_during_flights(
"""
Poll until every injected flights have been observed.

:param diagonals_m: List of diagonals in meters used by the virtual observer to fetch flights.
:param evaluation_func: This method is called on each polling tick with the area to observe. It is responsible
to fetch flights and to return the list of observed injected ids.
"""
Expand Down Expand Up @@ -174,7 +158,7 @@ def poll_func(rect: LatLngRect) -> bool:

virtual_observer.start_polling(
config.min_polling_interval.timedelta,
diagonals_m,
[self._rid_version.max_diagonal_km * 1000 - 100],
poll_func,
)

Expand Down
Loading