Fix #99549: Remember Previous Status #104217
@ -304,7 +304,7 @@ func TestWorkerRememberPreviousStatus(t *testing.T) {
|
|||||||
mf := newMockedFlamenco(mockCtrl)
|
mf := newMockedFlamenco(mockCtrl)
|
||||||
|
|
||||||
worker := testWorker()
|
worker := testWorker()
|
||||||
worker.Status = api.WorkerStatusTesting
|
worker.Status = api.WorkerStatusAwake
|
||||||
worker.StatusChangeRequest(api.WorkerStatusOffline, true)
|
worker.StatusChangeRequest(api.WorkerStatusOffline, true)
|
||||||
|
|
||||||
mf.broadcaster.EXPECT().BroadcastWorkerUpdate(api.SocketIOWorkerUpdate{
|
mf.broadcaster.EXPECT().BroadcastWorkerUpdate(api.SocketIOWorkerUpdate{
|
||||||
@ -328,8 +328,6 @@ func TestWorkerRememberPreviousStatus(t *testing.T) {
|
|||||||
mf.stateMachine.EXPECT().RequeueActiveTasksOfWorker(gomock.Any(), gomock.Eq(&worker), "worker signed off").Return(nil)
|
mf.stateMachine.EXPECT().RequeueActiveTasksOfWorker(gomock.Any(), gomock.Eq(&worker), "worker signed off").Return(nil)
|
||||||
mf.persistence.EXPECT().WorkerSeen(gomock.Any(), gomock.Eq(&worker))
|
mf.persistence.EXPECT().WorkerSeen(gomock.Any(), gomock.Eq(&worker))
|
||||||
|
|
||||||
worker.Status = api.WorkerStatusAwake
|
|
||||||
|
|
||||||
echo := mf.prepareMockedRequest(nil)
|
echo := mf.prepareMockedRequest(nil)
|
||||||
requestWorkerStore(echo, &worker)
|
requestWorkerStore(echo, &worker)
|
||||||
err := mf.flamenco.SignOff(echo)
|
err := mf.flamenco.SignOff(echo)
|
||||||
|
Loading…
Reference in New Issue
Block a user