X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f26f70d0a60798065c5f7a5cb91b95587cc9e9ef..319c1aa1ffcb065492eb1878687c993d7638e94e:/services/crunch-run/crunchrun_test.go diff --git a/services/crunch-run/crunchrun_test.go b/services/crunch-run/crunchrun_test.go index 37fe32a4dd..8cefbedf19 100644 --- a/services/crunch-run/crunchrun_test.go +++ b/services/crunch-run/crunchrun_test.go @@ -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) {