Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix only apply last subworkflow mock #280

Merged
merged 2 commits into from
Jan 22, 2024
Merged

Conversation

andresgomezfrr
Copy link
Collaborator

@andresgomezfrr andresgomezfrr commented Jan 22, 2024

TL;DR

Using the local executor if you try to mock subworkflow using .withWorkflowOutput(...) multiple times for the same workflow. You always get the last mock output for all inputs. This PR tries to fix this behavior allowing you to apply different mock outputs per input.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

To solve the issue we added a task inside the TestingWorkflow util to allow to compile and execute a workflow with a task with all of mocks, previously the TestingWorkflow was compiled by returning the output directly without an internal task, so when you applied multiple mocks to the same workflow, you always overwrite the workflowTemplate name with the last one.

Signed-off-by: Andres Gomez Ferrer <[email protected]>
Signed-off-by: Andres Gomez Ferrer <[email protected]>
@andresgomezfrr andresgomezfrr merged commit d33cd10 into master Jan 22, 2024
4 checks passed
@andresgomezfrr andresgomezfrr deleted the fix-subworkflow-mocks branch January 22, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants