Skip to content

Commit

Permalink
[uss_qualifier] Remove begin and end test step from prioritization_te…
Browse files Browse the repository at this point in the history
…st_steps (#420)

Remove begin and end test step from prioritization_test_steps
  • Loading branch information
BenjaminPelletier authored Dec 18, 2023
1 parent 20a0a81 commit c4d1768
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,13 @@ def _validate_ended_cancellation(self):
"Validate flight intent shared correctly",
self._intents_extent,
) as planned_validator:
self.begin_test_step("Plan flight intent")
_, flight_id = plan_flight_intent(
self,
"Plan flight intent",
self.tested_uss,
self.valid_flight.request,
)
self.end_test_step()
planned_validator.expect_shared(self.valid_flight.request)

_ = delete_flight_intent(
Expand All @@ -210,12 +211,13 @@ def _validate_ended_cancellation(self):
cancelled_validator.expect_not_shared()

def _validate_precision_intersection(self):
self.begin_test_step("Plan control flight intent")
_, _ = plan_flight_intent(
self,
"Plan control flight intent",
self.tested_uss,
self.valid_flight.request,
)
self.end_test_step()

with OpIntentValidator(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,13 @@ def _attempt_plan_flight_conflict(self) -> OperationalIntentReference:
"Validate Flight 2 sharing",
self._intents_extent,
) as validator:
self.begin_test_step("Plan Flight 2")
_, self.flight2_id = plan_flight_intent(
self,
"Plan Flight 2",
self.control_uss,
self.flight2_planned.request,
)
self.end_test_step()
flight_2_oi_ref = validator.expect_shared(self.flight2_planned.request)

with OpIntentValidator(
Expand All @@ -246,12 +247,13 @@ def _attempt_plan_flight_conflict(self) -> OperationalIntentReference:
"Validate Flight 1 not shared",
self._intents_extent,
) as validator:
self.begin_test_step("Attempt to plan Flight 1")
plan_conflict_flight_intent(
self,
"Attempt to plan Flight 1",
self.tested_uss,
self.flight1_planned.request,
)
self.end_test_step()
validator.expect_not_shared()

return flight_2_oi_ref
Expand All @@ -264,13 +266,14 @@ def _attempt_activate_flight_conflict(self):
"Validate Flight 1 not shared",
self._intents_extent,
) as validator:
self.begin_test_step("Attempt to directly activate conflicting Flight 1")
activate_conflict_flight_intent(
self,
"Attempt to directly activate conflicting Flight 1",
self.tested_uss,
self.flight1_activated.request,
self.flight1_id,
)
self.end_test_step()
validator.expect_not_shared()

def _attempt_modify_planned_flight_conflict(
Expand All @@ -283,12 +286,13 @@ def _attempt_modify_planned_flight_conflict(
"Validate Flight 1c sharing",
self._intents_extent,
) as validator:
self.begin_test_step("Plan Flight 1c")
_, self.flight1_id = plan_flight_intent(
self,
"Plan Flight 1c",
self.tested_uss,
self.flight1c_planned.request,
)
self.end_test_step()
flight_1_oi_ref = validator.expect_shared(self.flight1c_planned.request)

with OpIntentValidator(
Expand All @@ -299,13 +303,14 @@ def _attempt_modify_planned_flight_conflict(
self._intents_extent,
flight_1_oi_ref,
) as validator:
self.begin_test_step("Attempt to modify planned Flight 1c into conflict")
modify_planned_conflict_flight_intent(
self,
"Attempt to modify planned Flight 1c into conflict",
self.tested_uss,
self.flight1_planned.request,
self.flight1_id,
)
self.end_test_step()
flight_1_oi_ref = validator.expect_shared(
self.flight1c_planned.request, skip_if_not_found=True
)
Expand Down Expand Up @@ -340,13 +345,14 @@ def _attempt_modify_activated_flight_conflict(
self._intents_extent,
flight_1_oi_ref,
) as validator:
self.begin_test_step("Attempt to modify activated Flight 1c into conflict")
modify_activated_conflict_flight_intent(
self,
"Attempt to modify activated Flight 1c into conflict",
self.tested_uss,
self.flight1_activated.request,
self.flight1_id,
)
self.end_test_step()
flight_1_oi_ref = validator.expect_shared(
self.flight1c_activated.request, skip_if_not_found=True
)
Expand Down Expand Up @@ -386,12 +392,13 @@ def _modify_activated_flight_preexisting_conflict(
"Validate Flight 2m sharing",
self._intents_extent,
) as validator:
self.begin_test_step("Plan Flight 2m")
_, self.flight2_id = plan_flight_intent(
self,
"Plan Flight 2m",
self.control_uss,
self.flight2m_planned.request,
)
self.end_test_step()
flight_2_oi_ref = validator.expect_shared(self.flight2m_planned.request)

with OpIntentValidator(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,13 @@ def _attempt_plan_flight_conflict(self):
"Validate Flight 2 sharing",
self._intents_extent,
) as validator:
self.begin_test_step("Plan Flight 2")
resp_flight_2, self.flight2_id = plan_flight_intent(
self,
"Plan Flight 2",
self.control_uss,
self.flight2_planned.request,
)
self.end_test_step()
validator.expect_shared(self.flight2_planned.request)

with OpIntentValidator(
Expand All @@ -229,12 +230,13 @@ def _attempt_plan_flight_conflict(self):
"Validate Flight 1 not shared",
self._intents_extent,
) as validator:
self.begin_test_step("Attempt to plan Flight 1")
_ = plan_priority_conflict_flight_intent(
self,
"Attempt to plan Flight 1",
self.tested_uss,
self.flight1_planned.request,
)
self.end_test_step()
validator.expect_not_shared()

_ = delete_flight_intent(
Expand All @@ -252,12 +254,13 @@ def _attempt_modify_planned_flight_conflict(
"Validate Flight 1 sharing",
self._intents_extent,
) as validator:
self.begin_test_step("Plan Flight 1")
resp_flight_1, self.flight1_id = plan_flight_intent(
self,
"Plan Flight 1",
self.tested_uss,
self.flight1_planned.request,
)
self.end_test_step()
flight_1_oi_ref = validator.expect_shared(self.flight1_planned.request)

with OpIntentValidator(
Expand All @@ -267,12 +270,13 @@ def _attempt_modify_planned_flight_conflict(
"Validate Flight 2 sharing",
self._intents_extent,
) as validator:
self.begin_test_step("Plan Flight 2")
resp_flight_2, self.flight2_id = plan_flight_intent(
self,
"Plan Flight 2",
self.control_uss,
self.flight2_planned.request,
)
self.end_test_step()
validator.expect_shared(self.flight2_planned.request)

with OpIntentValidator(
Expand All @@ -283,13 +287,14 @@ def _attempt_modify_planned_flight_conflict(
self._intents_extent,
flight_1_oi_ref,
) as validator:
self.begin_test_step("Attempt to modify planned Flight 1 in conflict")
_ = modify_planned_priority_conflict_flight_intent(
self,
"Attempt to modify planned Flight 1 in conflict",
self.tested_uss,
self.flight1m_planned.request,
self.flight1_id,
)
self.end_test_step()
flight_1_oi_ref = validator.expect_shared(
self.flight1_planned.request, skip_if_not_found=True
)
Expand All @@ -307,13 +312,14 @@ def _attempt_activate_flight_conflict(
self._intents_extent,
flight_1_oi_ref,
) as validator:
self.begin_test_step("Attempt to activate conflicting Flight 1")
_ = activate_priority_conflict_flight_intent(
self,
"Attempt to activate conflicting Flight 1",
self.tested_uss,
self.flight1_activated.request,
self.flight1_id,
)
self.end_test_step()
flight_1_oi_ref = validator.expect_shared(
self.flight1_planned.request, skip_if_not_found=True
)
Expand Down Expand Up @@ -352,12 +358,13 @@ def _modify_activated_flight_conflict_preexisting(
"Validate Flight 2 sharing",
self._intents_extent,
) as validator:
self.begin_test_step("Plan Flight 2")
_, self.flight2_id = plan_flight_intent(
self,
"Plan Flight 2",
self.control_uss,
self.flight2_planned.request,
)
self.end_test_step()
flight_2_oi_ref = validator.expect_shared(self.flight2_planned.request)

with OpIntentValidator(
Expand Down Expand Up @@ -436,13 +443,14 @@ def _attempt_modify_activated_flight_conflict(
self._intents_extent,
flight_1_oi_ref,
) as validator:
self.begin_test_step("Attempt to modify activated Flight 1 in conflict")
modify_activated_priority_conflict_flight_intent(
self,
"Attempt to modify activated Flight 1 in conflict",
self.tested_uss,
self.flight1c_activated.request,
self.flight1_id,
)
self.end_test_step()
validator.expect_shared(
flight_1_intent.request,
skip_if_not_found=True,
Expand Down
Loading

0 comments on commit c4d1768

Please sign in to comment.