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

Test step fragment "Validate flight sharing" does not validate some issues properly #443

Closed
mickmis opened this issue Dec 22, 2023 · 0 comments · Fixed by #444
Closed

Test step fragment "Validate flight sharing" does not validate some issues properly #443

mickmis opened this issue Dec 22, 2023 · 0 comments · Fixed by #444
Labels
bug Something isn't working

Comments

@mickmis
Copy link
Contributor

mickmis commented Dec 22, 2023

Describe the bug
Refactoring of uss_qualifier/scenarios/astm/utm/test_steps.py by #376 introduced two issues in the validation of the operational intent details implemented in _evaluate_op_intent_validation.

Because arguments passed to add are not properly constructed as OpIntentValidationFailure type, the add has no effect.

Validation of number of vertices in the operational intent won't surface:

if n_vertices > 10000:
details = (
f"Operational intent {oi_full.reference.id} had too many total vertices - {n_vertices}",
)
validation_failures.add(
validation_failure_type=OpIntentValidationFailureType.VertexCount,
error_text=details,
)

(Some) incorrect JSON errors won't surface:

except (KeyError, ValueError) as e:
validation_failures.add(
validation_failure_type=OpIntentValidationFailureType.DataFormat,
error_text=e,
)

("some" because validation with the OpenAPI definition is done before and this one will surface properly).

Possible solution

                    validation_failures.add(
                        OpIntentValidationFailure(
                            validation_failure_type=OpIntentValidationFailureType.XXX,
                            error_text=xxx,
                        )
                    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant