probeTimeout := time.Second
ac := arvados.NewClientFromEnv()
- is, err := (&test.StubDriver{}).InstanceSet(nil, "test-instance-set-id", nil, suite.logger)
+ is, err := (&test.StubDriver{}).InstanceSet(nil, "test-instance-set-id", nil, suite.logger, nil)
c.Assert(err, check.IsNil)
inst, err := is.Create(arvados.InstanceType{}, "", nil, "echo InitCommand", nil)
c.Assert(err, check.IsNil)
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,