Manager: fix unit test

It was missing the task log broadcasting.
This commit is contained in:
Sybren A. Stüvel 2022-05-20 13:57:42 +02:00
parent c06baab8ab
commit 64e9f7cbbe

View File

@ -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)