[SFN][TestState] Fix state context tests MA/MR run failure#13460
[SFN][TestState] Fix state context tests MA/MR run failure#13460cloutierMat merged 4 commits intomainfrom
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.
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.
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 <79954947+cloutierMat@users.noreply.github.com>
cloutierMat
left a comment
There was a problem hiding this comment.
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