17384: Respect CrunchRunCommand and CrunchRunArgumentsList in a-d-c.
[arvados.git] / lib / dispatchcloud / worker / pool_test.go
index 7b116c3eefb09cdba27043598786f711a9c7cf53..0f5c5ee196d2866269f2bb999292e8a9672c3e47 100644 (file)
@@ -72,8 +72,8 @@ func (suite *PoolSuite) TestResumeAfterRestart(c *check.C) {
        newExecutor := func(cloud.Instance) Executor {
                return &stubExecutor{
                        response: map[string]stubResp{
-                               "crunch-run --list": {},
-                               "true":              {},
+                               "crunch-run-custom --list": {},
+                               "true":                     {},
                        },
                }
        }
@@ -87,6 +87,7 @@ func (suite *PoolSuite) TestResumeAfterRestart(c *check.C) {
                                SyncInterval:       arvados.Duration(time.Millisecond * 10),
                                TagKeyPrefix:       "testprefix:",
                        },
+                       CrunchRunCommand: "crunch-run-custom",
                },
                InstanceTypes: arvados.InstanceTypeMap{
                        type1.Name: type1,
@@ -224,14 +225,14 @@ func (suite *PoolSuite) TestNodeCreateThrottle(c *check.C) {
        c.Check(pool.Unallocated()[type1], check.Equals, 1)
        c.Check(res, check.Equals, false)
 
-       pool.instanceSet.throttleCreate.ResetError()
+       pool.instanceSet.throttleCreate.err = nil
        pool.maxConcurrentInstanceCreateOps = 2
 
        res = pool.Create(type1)
        c.Check(pool.Unallocated()[type1], check.Equals, 2)
        c.Check(res, check.Equals, true)
 
-       pool.instanceSet.throttleCreate.ResetError()
+       pool.instanceSet.throttleCreate.err = nil
        pool.maxConcurrentInstanceCreateOps = 0
 
        res = pool.Create(type1)