From 64e9f7cbbe995d59543ed4364527b693f794c0b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 20 May 2022 13:57:42 +0200 Subject: [PATCH] Manager: fix unit test It was missing the task log broadcasting. --- internal/manager/api_impl/workers_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/manager/api_impl/workers_test.go b/internal/manager/api_impl/workers_test.go index ddf92df6..ec1c93fb 100644 --- a/internal/manager/api_impl/workers_test.go +++ b/internal/manager/api_impl/workers_test.go @@ -186,8 +186,12 @@ func TestTaskUpdate(t *testing.T) { 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.broadcaster.EXPECT().BroadcastTaskLogUpdate(api.SocketIOTaskLogUpdate{ + TaskId: taskID, + Log: "line1\nline2\n", + }) // Do the call. echoCtx := mf.prepareMockedJSONRequest(taskUpdate)