-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
StepFunctions: Clean-up legacy JSONata unit tests #11921
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
Conversation
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 33m 33s ⏱️ - 1h 17m 46s Results for commit ddf5905. ± Comparison against base commit 6fea92c. This pull request removes 2592 tests.
♻️ This comment has been updated with latest results. |
from tests.aws.services.stepfunctions.templates.querylanguage.query_language_templates import ( | ||
QueryLanguageTemplate, | ||
) |
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.
I would actually still heavily discourage importing from the integration tests here in the unit tests. Duplicating the state machine definition here is absolutely fine for that.
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.
I agree. I was considering converting these to snapshot tests instead for the scenarios we don't cover there
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.
Coverage overlap is hard to judge without a deep understanding, but LGTM as far as I can judge.
Favoring aws-validated tests (e.g., tests/aws/services/stepfunctions/v2/evaluate_jsonata
) over potentially drifting unit test makes sense here.
🧹 🧹🧹
reason="Single-quote esacped JSONata expressions are not yet supported", | ||
), | ||
), | ||
{"Items": EJT.JSONATA_ARRAY_ELEMENT_EXPRESSION}, |
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.
🥳
@@ -5,92 +5,134 @@ | |||
from localstack.services.stepfunctions.asl.static_analyser.usage_metrics_static_analyser import ( | |||
UsageMetricsStaticAnalyser, | |||
) | |||
from tests.aws.services.stepfunctions.templates.assign.assign_templates import ( |
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.
Thanks for getting rid of such cross-test imports 🧹
Motivation
Given the extensive number of JSONata library integration tests now included in the v2 integration test suite, along with the intention to continue expanding them, these changes remove most of the legacy unit tests for JSONata integration. The legacy tests were previously skipped due to undesired imports from the integration test library, which created an import antipattern. Additionally, duplicate test cases were identified and removed from the analytics test suite.
Changes