Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Make it possible to use context in WorkflowRehearsal Test Cases #275

Copy link
Copy link

Description

@jpavlav
Issue body actions

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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.