Describe the bug
When using the stepfunctions test_state function. If the tested state is of type state machine and using mock input. the test_state function fails the mock data passed to the function need to be changed from real world return values.
# Real state return values - fails
Output: object
StopDate: int
StartDate: int
Output: object
# The works
Output: string
StopDate: string
StartDate: string
Output: string
Changing the mock structure corrects this error but creates another one. The "Output" field in the state definition need to be changed:
From
"Output": "{% $merge([$states.result.Output, $states.input, {'h5ad_file':$states.result.Output.in_file}]) %}"
To:
"Output": "{% $merge([$parse($states.result.Output), $states.input, {'h5ad_file':$parse($states.result.Output).in_file}]) %}"
Regression Issue
Expected Behavior
The data that the mock param recives should be exactly like the one the step function state returns
Current Behavior
None
Reproduction Steps
- Create a state definition of type - state machine execution.
- Get actual return values from a real state machine step
- Insert as mock values.
Possible Solution
No response
Additional Information/Context
No response
SDK version used
1.42.11
Environment details (OS name and version, etc.)
22.04.1-Ubuntu
Describe the bug
When using the stepfunctions test_state function. If the tested state is of type state machine and using mock input. the test_state function fails the mock data passed to the function need to be changed from real world return values.
Changing the mock structure corrects this error but creates another one. The "Output" field in the state definition need to be changed:
From
"Output": "{% $merge([$states.result.Output, $states.input, {'h5ad_file':$states.result.Output.in_file}]) %}"To:
"Output": "{% $merge([$parse($states.result.Output), $states.input, {'h5ad_file':$parse($states.result.Output).in_file}]) %}"Regression Issue
Expected Behavior
The data that the mock param recives should be exactly like the one the step function state returns
Current Behavior
None
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
SDK version used
1.42.11
Environment details (OS name and version, etc.)
22.04.1-Ubuntu