1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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>
This commit is contained in:
Doug Davis 2015-03-10 05:43:49 -07:00
parent c5af44e6d0
commit a853f8e468

View file

@ -357,6 +357,7 @@ func TestBuildApiDockerFileRemote(t *testing.T) {
server, err := fakeStorage(map[string]string{ server, err := fakeStorage(map[string]string{
"testD": `FROM busybox "testD": `FROM busybox
COPY * /tmp/ COPY * /tmp/
RUN find / -name ba*
RUN find /tmp/`, RUN find /tmp/`,
}) })
if err != nil { if err != nil {
@ -369,9 +370,11 @@ RUN find /tmp/`,
t.Fatalf("Build failed: %s", err) 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) out := string(buf)
if !strings.Contains(out, "/tmp/Dockerfile") || if !strings.Contains(out, "/tmp/Dockerfile") ||
strings.Contains(out, "/tmp/baz") { strings.Contains(out, "baz") {
t.Fatalf("Incorrect output: %s", out) t.Fatalf("Incorrect output: %s", out)
} }