Hey all,
I’m trying to mock GetWorkflowExecutionHistory
for a test. My workflow is triggered via SignalWithStartWorkflow
and it makes calls to SignalWithStartWorkflowExecution
and GetWorkflowExecutionHistory
. In my tests, I’m expecting to mock the behaviour of a new workflow.
My current test code for mock returns the following
&temporalWfServ.GetWorkflowExecutionHistoryResponse{
History: &history.History{
Events: []*history.HistoryEvent{
{
EventId: 1,
EventTime: &eventTime,
EventType: enums.EventType(1), // EVENT_TYPE_WORKFLOW_EXECUTION_STARTED
Version: 1,
TaskId: 1,
Attributes: nil,
},
{
EventId: 2,
EventTime: &eventTime,
EventType: enums.EventType(26), // EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED
Version: 1,
TaskId: 2,
Attributes: nil,
},
},
},
RawHistory: nil,
NextPageToken: nil,
Archived: false,
}, nil
However, I’m getting the error: unexpected event type WorkflowExecutionStarted when handling workflow execution result
How do I get this done correctly?