From 53b5fb41d2e08dc45a491836a8e8b0fff3961f0e Mon Sep 17 00:00:00 2001 From: Christie Wilson Date: Fri, 3 Aug 2018 10:01:29 -0700 Subject: [PATCH] Don't copy same files twice in copy integration tests (#273) * Don't copy same files twice in copy integration tests * Use error from RunCommandWithoutTest --- integration/cmd.go | 2 +- integration/context/qux/qup | 1 + integration/context/qux/quw/que | 1 + integration/context/qux/quz | 1 + integration/dockerfiles/Dockerfile_test_copy | 2 +- integration/dockerfiles/Dockerfile_test_copy_bucket | 2 +- integration/dockerfiles/Dockerfile_test_copy_reproducible | 2 +- 7 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 integration/context/qux/qup create mode 100644 integration/context/qux/quw/que create mode 100644 integration/context/qux/quz diff --git a/integration/cmd.go b/integration/cmd.go index 37537b417..51be33733 100644 --- a/integration/cmd.go +++ b/integration/cmd.go @@ -30,7 +30,7 @@ func RunCommandWithoutTest(cmd *exec.Cmd) ([]byte, error) { fmt.Println(cmd.Args) fmt.Println(string(output)) } - return output, nil + return output, err } // RunCommand will run cmd and if it fails will output relevant info for debugging diff --git a/integration/context/qux/qup b/integration/context/qux/qup new file mode 100644 index 000000000..592539464 --- /dev/null +++ b/integration/context/qux/qup @@ -0,0 +1 @@ +qup diff --git a/integration/context/qux/quw/que b/integration/context/qux/quw/que new file mode 100644 index 000000000..b3d5d4c7d --- /dev/null +++ b/integration/context/qux/quw/que @@ -0,0 +1 @@ +que diff --git a/integration/context/qux/quz b/integration/context/qux/quz new file mode 100644 index 000000000..512afe2dc --- /dev/null +++ b/integration/context/qux/quz @@ -0,0 +1 @@ +quz diff --git a/integration/dockerfiles/Dockerfile_test_copy b/integration/dockerfiles/Dockerfile_test_copy index 94d8de634..84d2aedc3 100644 --- a/integration/dockerfiles/Dockerfile_test_copy +++ b/integration/dockerfiles/Dockerfile_test_copy @@ -9,7 +9,7 @@ COPY ./ dir/ COPY . newdir COPY context/bar /baz/ COPY ["context/foo", "/tmp/foo" ] -COPY context/b* /baz/ +COPY context/q* /qux/ COPY context/foo context/bar/ba? /test/ COPY context/arr[[]0].txt /mydir/ COPY context/bar/bat . diff --git a/integration/dockerfiles/Dockerfile_test_copy_bucket b/integration/dockerfiles/Dockerfile_test_copy_bucket index 94d8de634..84d2aedc3 100644 --- a/integration/dockerfiles/Dockerfile_test_copy_bucket +++ b/integration/dockerfiles/Dockerfile_test_copy_bucket @@ -9,7 +9,7 @@ COPY ./ dir/ COPY . newdir COPY context/bar /baz/ COPY ["context/foo", "/tmp/foo" ] -COPY context/b* /baz/ +COPY context/q* /qux/ COPY context/foo context/bar/ba? /test/ COPY context/arr[[]0].txt /mydir/ COPY context/bar/bat . diff --git a/integration/dockerfiles/Dockerfile_test_copy_reproducible b/integration/dockerfiles/Dockerfile_test_copy_reproducible index 94d8de634..84d2aedc3 100644 --- a/integration/dockerfiles/Dockerfile_test_copy_reproducible +++ b/integration/dockerfiles/Dockerfile_test_copy_reproducible @@ -9,7 +9,7 @@ COPY ./ dir/ COPY . newdir COPY context/bar /baz/ COPY ["context/foo", "/tmp/foo" ] -COPY context/b* /baz/ +COPY context/q* /qux/ COPY context/foo context/bar/ba? /test/ COPY context/arr[[]0].txt /mydir/ COPY context/bar/bat .