9005: Copy default transport if possible. Move magics to consts.
[arvados.git] / services / crunch-run / crunchrun_test.go
index 64eed2c1d3df6da7a5c18e5d197897a8f2731614..8cefbedf19200f165eb7d607dec93bbad330b6f5 100644 (file)
@@ -139,8 +139,15 @@ func (t *TestDockerClient) ContainerStop(ctx context.Context, container string,
        return nil
 }
 
-func (t *TestDockerClient) ContainerWait(ctx context.Context, container string) (int64, error) {
-       return int64(t.finish), nil
+func (t *TestDockerClient) ContainerWait(ctx context.Context, container string, condition dockercontainer.WaitCondition) (<-chan dockercontainer.ContainerWaitOKBody, <-chan error) {
+       body := make(chan dockercontainer.ContainerWaitOKBody)
+       err := make(chan error)
+       go func() {
+               body <- dockercontainer.ContainerWaitOKBody{StatusCode: int64(t.finish)}
+               close(body)
+               close(err)
+       }()
+       return body, err
 }
 
 func (t *TestDockerClient) ImageInspectWithRaw(ctx context.Context, image string) (dockertypes.ImageInspect, []byte, error) {
@@ -1491,7 +1498,7 @@ func (s *TestSuite) TestOutputError(c *C) {
        extraMounts := []string{}
 
        api, _, _ := FullRunHelper(c, helperRecord, extraMounts, 0, func(t *TestDockerClient) {
-               os.Symlink("/does/not/exist", t.realTemp+"/2/baz")
+               os.Symlink("/etc/hosts", t.realTemp+"/2/baz")
                t.logWriter.Close()
        })