瀏覽代碼

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 <dug@us.ibm.com>
Doug Davis 10 年之前
父節點
當前提交
a853f8e468
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      integration-cli/docker_api_containers_test.go

+ 4 - 1
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)
 	}