-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[SFN][TestState] Fix state context tests MA/MR run failure #13460
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
[SFN][TestState] Fix state context tests MA/MR run failure #13460
Conversation
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 21m 12s ⏱️ - 1h 44m 2s Results for commit 04d3433. ± Comparison against base commit 84bdd4a. This pull request removes 3401 tests.♻️ This comment has been updated with latest results. |
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 40m 5s ⏱️ Results for commit 04d3433. ♻️ This comment has been updated with latest results. |
tests/aws/services/stepfunctions/v2/test_state/test_state_context_object.py
Outdated
Show resolved
Hide resolved
| _CONTEXT_OBJECT_FULL: Final[dict] = { | ||
| "Execution": { | ||
| "Id": "arn:aws:states:us-east-1:123456789012:execution:MyStateMachine:execution-name-12345", | ||
| "Id": "arn:aws:states:__region_placeholder__:__account_id_placeholder__:execution:MyStateMachine:execution-name-12345", |
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.
Would we be able to get rid of the placeholder and transformer? I think arn:aws:states:::execution:MyStateMachine:execution-name-12345 should just work out of the box 🤔
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.
Yes! Thank you a lot @cloutierMat! Region and account are not affecting the functionality being tested. Removing them simplifies test setup. 👍
They are not affecting the functionality being tested. Removing them simplifies test setup. Co-authored-by: Mathieu Cloutier <[email protected]>
cloutierMat
left a 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.
Awesome! Thanks for the extra diligence of re-running the snapshot! 🚀
Motivation
Fix a test added in #13418
Closes DRG-299.
Changes
Context object constant had a hardcoded
us-east-1region. Adjusts constant to be a template that is modified according to the region fixture value.Also adding account id replacement according to fixture. Although the test was not failing on account id, such a replacement will cover all MA/MR bases.
Also removes unnecessary
roleArnfrom context object test requests, as a follow-up to #13459, making tests much faster against AWS.Tests
Related