Make it possible to use `context` in `WorkflowRehearsal` Test Cases
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
Research direction
Start with the WorkflowTestCase spec and the WorkflowRehearsal test case, then trace how workflow variables are evaluated when st2.action_execution_id is referenced. Add support for passing context through the spec and using it during rehearsal, and verify that the reported context assertion no longer occurs for workflows using st2 context.
Written by the indexing model from the issue text.
Description
I was working on some unit tests for some st2 workflows and the WorkflowRehearsal test case doesn't account for times when the st2 context may be accessed in the workflow. I have a workflow that defines in the vars section a variable that includes st2.action_execution_id. It results in an exception like this one:
E AssertionError: {'context': [{'type': 'yaql', 'expression'[161 chars]t'}]} != {}
E + {}
E - {'context': [{'expression': '<% ctx().st2.action_execution_id %>',
E - 'message': 'Variable "st2" is referenced before assignment.',
E - 'schema_path': 'properties.output',
E - 'spec_path': 'output[1]',
E - 'type': 'yaql'}]}
It would be useful to be able to pass in context to the WorkflowTestCase spec and then update the WorkflowRehearsal test case to make use of it.
- Dominant language
- Python
- Stars
- 111
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from StackStorm/orquesta
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
StackStorm/orquesta#274 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
StackStorm/orquesta#272 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
StackStorm/orquesta#268 ·
-
Vague error Open
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
StackStorm/orquesta#265 · 1 comment ·
-
task with join: all starts without waiting for all the previous task completed when there is a loop Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
StackStorm/orquesta#263 ·
All issues in StackStorm/orquesta
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100