Fix #99549: Remember Previous Status #104217

Merged
Sybren A. Stüvel merged 16 commits from Evelinealy/flamenco:web-api-upgrade into main 2023-06-02 22:50:10 +02:00
Showing only changes of commit 8b041d777f - Show all commits

View File

@ -304,7 +304,7 @@ func TestWorkerRememberPreviousStatus(t *testing.T) {
mf := newMockedFlamenco(mockCtrl)
worker := testWorker()
worker.Status = api.WorkerStatusTesting
worker.Status = api.WorkerStatusAwake
worker.StatusChangeRequest(api.WorkerStatusOffline, true)
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.persistence.EXPECT().WorkerSeen(gomock.Any(), gomock.Eq(&worker))
worker.Status = api.WorkerStatusAwake
echo := mf.prepareMockedRequest(nil)
requestWorkerStore(echo, &worker)
err := mf.flamenco.SignOff(echo)