20602: Attach assigned priority to response log entry.
[arvados.git] / lib / dispatchcloud / worker / pool_test.go
index 7b5634605fee5c20b987c06078eb78b0dc6841b6..7f3a1531ea06bed7daebeef6dd913ddab11a53bd 100644 (file)
@@ -266,6 +266,7 @@ func (suite *PoolSuite) TestCreateUnallocShutdown(c *check.C) {
                        type2.Name: type2,
                        type3.Name: type3,
                },
+               instanceInitCommand: "echo 'instance init command goes here'",
        }
        notify := pool.Subscribe()
        defer pool.Unsubscribe(notify)
@@ -294,6 +295,9 @@ func (suite *PoolSuite) TestCreateUnallocShutdown(c *check.C) {
                return len(pool.workers) == 4
        })
 
+       vms := instanceSet.(*test.StubInstanceSet).StubVMs()
+       c.Check(string(vms[0].InitCommand), check.Matches, `umask 0177 && echo -n "[0-9a-f]+" >/var/run/arvados-instance-secret\necho 'instance init command goes here'`)
+
        // Place type3 node on admin-hold
        ivs := suite.instancesByType(pool, type3)
        c.Assert(ivs, check.HasLen, 1)