Skip to content
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]Check and pass any additional fields in the InjectFlightRequest #315

Closed

Conversation

punamverma
Copy link
Contributor

@punamverma punamverma commented Nov 3, 2023

  1. Check for any extra fields in InjectFlightRequest.
  2. Populate additional_fields with those extra fields.
  3. This will be used to pass modified behavior fields to mock_uss.
  4. Eg. usage for modifying mock_uss behavior in a scenario-
  mod = MockUssFlightBehavior(
            modify_sharing_methods=["GET", "POST"],
            modify_fields={
                "reference": {"state": "Flying"},
                "details": {"priority": -1},
            },
        )
        
   mod_req = MockUSSInjectFlightRequest(
            operational_intent=req.operational_intent,
            flight_authorisation=req.flight_authorisation,
            behavior=mod,
        )
        
   plan_flight_intent(
             self,
             "Control_uss plans flight 2, sharing invalid operational intent data",
             self.control_uss,
             mod_req,
       )

@BenjaminPelletier
Copy link
Member

@punamverma
Copy link
Contributor Author

Why would we want to change this deprecated class? To send a flight planning request to mock_uss including specification of bad behavior, we should use what MockUSSResource produces (a MockUSSClient) since control_uss is provided as a MockUSSResource in that linked test scenario. That's what I suggested here.

Will use it when I have MockUSSResource code ready. Just created this draft PR for Mike, if he wants to check how the mock behavior works. If you think its of no help, I ll remove the PR.

@punamverma punamverma closed this Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants