From a853f8e4687adb78c0e63019caae32b216cce925 Mon Sep 17 00:00:00 2001 From: Doug Davis Date: Tue, 10 Mar 2015 05:43:49 -0700 Subject: [PATCH] Fixup a test for -f processing Thanks to @ahmetalpbalkan for noticing... we had an old check in this testcase that no longer applied (due to stuff being removing recently). However, while in there I added a check to make sure that the file referenced by the query parameter isn't used at all. Signed-off-by: Doug Davis --- integration-cli/docker_api_containers_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/integration-cli/docker_api_containers_test.go b/integration-cli/docker_api_containers_test.go index 77638fa530..02d4291b48 100644 --- a/integration-cli/docker_api_containers_test.go +++ b/integration-cli/docker_api_containers_test.go @@ -357,6 +357,7 @@ func TestBuildApiDockerFileRemote(t *testing.T) { server, err := fakeStorage(map[string]string{ "testD": `FROM busybox COPY * /tmp/ +RUN find / -name ba* RUN find /tmp/`, }) if err != nil { @@ -369,9 +370,11 @@ RUN find /tmp/`, t.Fatalf("Build failed: %s", err) } + // Make sure Dockerfile exists. + // Make sure 'baz' doesn't exist ANYWHERE despite being mentioned in the URL out := string(buf) if !strings.Contains(out, "/tmp/Dockerfile") || - strings.Contains(out, "/tmp/baz") { + strings.Contains(out, "baz") { t.Fatalf("Incorrect output: %s", out) }