Fix integration tests for #776

This commit is contained in:
Victor Noel 2019-10-04 10:31:40 +02:00
parent 5700de039d
commit ff7abba47b
3 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
# This is not included in integration tests because docker build does not exploit Dockerfile.dockerignore
# See https://github.com/moby/moby/issues/12886#issuecomment-523706042 for more details
# This dockerfile makes sure Dockerfile.dockerignore is working
# If so then ignore_relative/foo should copy to /foo
# If not, then this image won't build because it will attempt to copy three files to /foo, which is a file not a directory
FROM scratch
FROM scratch
COPY ignore_relative/* /foo

View File

@ -709,7 +709,7 @@ func Test_correctDockerignoreFileIsUsed(t *testing.T) {
{
name: "relative dockerfile used",
args: args{
dockerfilepath: "../../integration/dockerfiles/Dockerfile_test_dockerignore_relative",
dockerfilepath: "../../integration/dockerfiles/Dockerfile_dockerignore_relative",
buildcontext: "../../integration/",
excluded: []string{"ignore_relative/bar"},
included: []string{"ignore_relative/foo", "ignore/bar"},