Skip to content

Conversation

@gregfurman
Copy link
Contributor

@gregfurman gregfurman commented Nov 27, 2025

Motivation

Adds limited support for mocking a ContextObject in the SFN TestState API.

Changes

  • Uses pydantic (and some python magic) to validate that passed in context, and bubble up a validationexception.
  • Reworks the inspectionData approach to instead patch each _eval_body and add appended results for a given key

Tests

Related

Addresses DRG-109

@gregfurman gregfurman requested a review from tiurin November 27, 2025 16:27
@gregfurman gregfurman self-assigned this Nov 27, 2025
@gregfurman gregfurman added aws:stepfunctions AWS Step Functions semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes labels Nov 27, 2025
@github-actions
Copy link

github-actions bot commented Nov 27, 2025

Test Results - Preflight, Unit

22 669 tests  ±0   20 901 ✅ ±0   6m 15s ⏱️ -11s
     1 suites ±0    1 768 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit d1ba2b3. ± Comparison against base commit c5d5aab.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 27, 2025

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 21s ⏱️ +3s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit d1ba2b3. ± Comparison against base commit c5d5aab.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 27, 2025

Test Results (amd64) - Integration, Bootstrap

    5 files  ±    0      5 suites  ±0   39m 40s ⏱️ - 1h 59m 47s
1 690 tests  - 3 727  1 609 ✅  - 3 270  81 💤  - 457  0 ❌ ±0 
1 696 runs   - 3 727  1 609 ✅  - 3 270  87 💤  - 457  0 ❌ ±0 

Results for commit d1ba2b3. ± Comparison against base commit c5d5aab.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 27, 2025

LocalStack Community integration with Pro

    2 files  ±    0      2 suites  ±0   21m 38s ⏱️ - 1h 47m 29s
1 666 tests  - 3 377  1 584 ✅  - 3 081  82 💤  - 296  0 ❌ ±0 
1 668 runs   - 3 377  1 584 ✅  - 3 081  84 💤  - 296  0 ❌ ±0 

Results for commit d1ba2b3. ± Comparison against base commit c5d5aab.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@tiurin tiurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@gregfurman gregfurman marked this pull request as ready for review November 28, 2025 11:25
@tiurin tiurin merged commit 58f49e9 into feature/step-functions/test-state-main Nov 28, 2025
40 checks passed
@tiurin tiurin deleted the add/test-state/mock-context branch November 28, 2025 11:51
tiurin pushed a commit that referenced this pull request Nov 28, 2025
Adds limited support for mocking a ContextObject in the SFN TestState API.

Empty context case is not accounted for.

Changes
Uses pydantic (and some python magic) to validate that passed in context, and bubble up a validationexception.
Reworks the inspectionData approach to instead patch each _eval_body and add appended results for a given key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aws:stepfunctions AWS Step Functions docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants