X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f2788dd5fc3ef725969d6c0fcc4ddee3754829fc..96d8b9e1afecccae803ec4b956ada745dbe71d9f:/lib/dispatchcloud/worker/worker_test.go diff --git a/lib/dispatchcloud/worker/worker_test.go b/lib/dispatchcloud/worker/worker_test.go index 2ee6b7c362..d04ecbb72f 100644 --- a/lib/dispatchcloud/worker/worker_test.go +++ b/lib/dispatchcloud/worker/worker_test.go @@ -122,6 +122,39 @@ func (suite *WorkerSuite) TestProbeAndUpdate(c *check.C) { expectState: StateUnknown, expectRunning: 1, }, + { + testCaseComment: "Unknown, boot probe fails, deployRunner succeeds, container is running", + state: StateUnknown, + respBoot: respFail, + respRun: respFail, + respRunDeployed: respContainerRunning, + deployRunner: []byte("ELF"), + expectStdin: []byte("ELF"), + expectState: StateUnknown, + expectRunning: 1, + }, + { + testCaseComment: "Unknown, boot timeout exceeded, boot probe fails but deployRunner succeeds and container is running", + state: StateUnknown, + age: bootTimeout * 2, + respBoot: respFail, + respRun: respFail, + respRunDeployed: respContainerRunning, + deployRunner: []byte("ELF"), + expectStdin: []byte("ELF"), + expectState: StateUnknown, + expectRunning: 1, + }, + { + testCaseComment: "Unknown, boot timeout exceeded, boot probe fails but deployRunner succeeds and no container is running", + state: StateUnknown, + age: bootTimeout * 2, + respBoot: respFail, + respRun: respFail, + deployRunner: []byte("ELF"), + expectStdin: []byte("ELF"), + expectState: StateShutdown, + }, { testCaseComment: "Booting, boot probe fails, run probe fails", state: StateBooting,