-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[uss_qualifier] Clean up get op data validation scenario #419
[uss_qualifier] Clean up get op data validation scenario #419
Conversation
The test driver attempts to plan flight 1 via the tested USS. It checks if any conflicts with flight 2 | ||
which is of equal priority and came first. | ||
|
||
### [Validate flight 1 sharing test step](../validate_shared_operational_intent.md) | ||
Validate flight 1 is planned. | ||
|
||
### Check for notification to tested_uss due to subscription in flight 2 area test step |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After sharing flight1, there are other POST interactions that might happen. We will be able to catch the flight2 notification immediately after it's planned. Or else we will need to know the base_url for uss_endpoint of the tested_uss, which we don't have access to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point -- currently, the test looks for any POST interaction which is needlessly broad since the notifications we're looking for would only be outgoing from mock_uss. I'll clean that up as well, and then this move should be fine since mock_uss does not make any outgoing POST notifications in the steps in between this step's old position and its new position.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now fixed -- instead of just searching according to POST generally (which is only one small characteristic of the interactions of interest), we now search much more specifically and can differentiate (for instance) between incoming and outgoing operational intent details notifications.
The test driver attempts to plan the flight 1 via the tested_uss. It checks if any conflicts with flight 2 | ||
which is of equal priority and came first. | ||
|
||
### [Validate flight 1 not shared by tested_uss test step](../validate_not_shared_operational_intent.md) | ||
Validate flight 1 is not shared with DSS, as plan failed. | ||
|
||
### Check for notification to tested_uss due to subscription in flight 2 area test step |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed per above.
"Validate flight2 GET interaction, if no notification", | ||
|
||
self.begin_test_step( | ||
"Check for notification to tested_uss due to subscription in flight 2 area" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why we would want to check for notifications here, instead of close to when it was sent after planning flight 2. Then we have to go through less number of interactions to filter it out.
I am not saying this is wrong, but trying to understand the reason behind it. I understand its close to where its being used, is that the reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking later gives more time for the notification to happen, we're searching since flight_2_planning_time in any case, and the result isn't used until later (where this step is now). We're now filtering for the notification we actually want via method, URL, and op intent ID, so the likelihood of a false positive is very low regardless of the number of other interactions in the mean time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually don't need to wait here, as the outgoing notifications from mock_uss are sent sequentially before sending Completed response to uss_qualifier. So, if we get a success plan from mock_uss, we know the notifications have already been sent.
Checking later is fine with me.
|
||
This step obtains interactions of interest from mock_uss. | ||
|
||
## 🛑 MockUSS interactions request check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, we just copy the High Severity symbol into the doc. How does it get related to the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good.
|
@@ -1,54 +1,56 @@ | |||
from __future__ import annotations | |||
|
|||
import datetime | |||
import re | |||
from typing import List, Tuple, Optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing import for Dict and Callable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added, thanks. My IDE is going crazy on this file specifically
from implicitdict import StringBasedDateTime | ||
from loguru import logger | ||
from uas_standards.astm.f3548.v21 import api | ||
from uas_standards.astm.f3548.v21.api import OperationID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing import for EntityID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added, thanks
I like the idea of removing begin_test_step and end_test_step from reusable code. Initially, it took me some time to understand the flow of the tests because of that. I thought it was a convention being used in the code. Taking it out is a good idea. |
@@ -2,8 +2,8 @@ | |||
|
|||
## Description | |||
This test checks that the USS being tested validates the operational intents received as response to its GET request from another USS. | |||
Control_uss which is a mock uss plans a nearby V-shaped operation, and provides the data that tested_uss GETs. | |||
tested_uss validates the GET response from control_uss and accordingly plan its operation. | |||
mock_uss which is a mock uss plans a nearby V-shaped operation, and provides the data that tested_uss GETs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mock_uss which is a mock uss plans a nearby V-shaped operation, and provides the data that tested_uss GETs. | |
mock_uss plans a nearby V-shaped operation, and provides the data that tested_uss GETs. |
The control_uss, which is mock_uss is instructed to share invalid data with other USS, for negative test. | ||
### [mock_uss plans flight 2, sharing invalid operational intent data test step](../../../flight_planning/plan_flight_intent.md) | ||
Flight 2 should be successfully planned by the mock_uss. | ||
The mock_uss, which is mock_uss is instructed to share invalid data with other USS, for negative test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mock_uss, which is mock_uss is instructed to share invalid data with other USS, for negative test. | |
mock_uss is instructed to share invalid data with other USS, for negative test. |
This PR cleans up a few things in the Data Validation of GET operational intents by USS test scenario:
begin_test_step
andend_test_step
are removed from reusable test step fragments per Change reusable test steps to reusable test step fragments #380control_uss
is changed tomock_uss
because we know that resource is a mock USS, so therefore there is no difference between control_uss and mock_uss, and one consistent name is easier to comprehend-- edit --
-- edit 2 --
f3548_self_contained
to complete #425