Hi there,
I am writing a test to simulate error handling for a failed call to GetChildWorkflowExecution. Looking for how to mock this behavior in the test.
In the parent workflow, I am triggering an ExecuteChildWorkflow call to a second workflow. It is a long running workflow, so I am using GetChildWorkflowExecution to validate that the child workflow was successfully started before continuing on in the parent workflow.
I would like to test the error handling when this child workflow does not start successfully.
I have this child workflow registered in the test suite and am trying to use an s.env.onWorkflow helper to mock it out. Is there something I can to with s.env.onWorkflow (or some other way) to simulate a failed response from the GetChildWorkflowExecution call?
Awesome, thanks Chad.
This looks like what I need.
Do you have an example of this working?
I was able to access the ErrMockStartChildWorkflowFailed on the internal package, but from what I understand you’re not supposed to use the internal pacakge directly (also it breaks the tests).