I have a workflow w1 that calles child workflow cw1. w1 sets a value in the context that is propagated to the child workflow.
I’m writing unit test to validate the child workflow, but the problem is that i need to inject a value into the context. I’m not sure how that can be done. Note: I’m calling the workflow with .ExecuteWorkflow and treating it as a parent workflow vs. using .ExecuteChildWorkflow which is used in the actual code.
I saw this post go - temporal: when testing, how do I pass context into workflows and activities? - Stack Overflow but this talks more about how to inject a context into the activity and when I looked at the API, it doesn’t seem to support it.
I looked at the ctxpropagation example on the sample project and it seems to inject it at the listener for an activity, but I don’t think there is some thing similar at the workflow level.