Manager: fix unit test
It was missing the task log broadcasting.
This commit is contained in:
parent
c06baab8ab
commit
64e9f7cbbe
@ -186,8 +186,12 @@ func TestTaskUpdate(t *testing.T) {
|
|||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
// Expect the log to be written.
|
// Expect the log to be written and broadcast over SocketIO.
|
||||||
mf.logStorage.EXPECT().Write(gomock.Any(), jobID, taskID, "line1\nline2\n")
|
mf.logStorage.EXPECT().Write(gomock.Any(), jobID, taskID, "line1\nline2\n")
|
||||||
|
mf.broadcaster.EXPECT().BroadcastTaskLogUpdate(api.SocketIOTaskLogUpdate{
|
||||||
|
TaskId: taskID,
|
||||||
|
Log: "line1\nline2\n",
|
||||||
|
})
|
||||||
|
|
||||||
// Do the call.
|
// Do the call.
|
||||||
echoCtx := mf.prepareMockedJSONRequest(taskUpdate)
|
echoCtx := mf.prepareMockedJSONRequest(taskUpdate)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user