From 6ff308d89271be79e2ccd8c9ebff3a39eb01596a Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Tue, 11 Aug 2020 14:38:28 -0400 Subject: [PATCH] Run download only test with docker daemon unavailable --- test/integration/aaa_download_only_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/integration/aaa_download_only_test.go b/test/integration/aaa_download_only_test.go index 7c69403363..61627f072f 100644 --- a/test/integration/aaa_download_only_test.go +++ b/test/integration/aaa_download_only_test.go @@ -165,7 +165,10 @@ func TestDownloadOnlyKic(t *testing.T) { args := []string{"start", "--download-only", "-p", profile, "--force", "--alsologtostderr"} args = append(args, StartArgs()...) - if _, err := Run(t, exec.CommandContext(ctx, Target(), args...)); err != nil { + cmd := exec.CommandContext(ctx, Target(), args...) + // make sure this works even if docker daemon isn't running + cmd.Env = append(os.Environ(), "DOCKER_HOST=/does/not/exist") + if _, err := Run(t, cmd); err != nil { t.Errorf("start with download only failed %q : %v", args, err) }