@@ -34,9 +34,10 @@ func TestDockerContext(t *testing.T) {
34
34
os .Mkdir (filepath .Join (tmpDir , "files" ), 0750 )
35
35
ioutil .WriteFile (filepath .Join (tmpDir , "files" , "ignored.txt" ), []byte ("" ), 0644 )
36
36
ioutil .WriteFile (filepath .Join (tmpDir , "files" , "included.txt" ), []byte ("" ), 0644 )
37
- ioutil .WriteFile (filepath .Join (tmpDir , ".dockerignore" ), []byte ("**/ignored.txt" ), 0644 )
37
+ ioutil .WriteFile (filepath .Join (tmpDir , ".dockerignore" ), []byte ("**/ignored.txt\n alsoignored.txt " ), 0644 )
38
38
ioutil .WriteFile (filepath .Join (tmpDir , "Dockerfile" ), []byte ("FROM alpine\n COPY ./files /files" ), 0644 )
39
39
ioutil .WriteFile (filepath .Join (tmpDir , "ignored.txt" ), []byte ("" ), 0644 )
40
+ ioutil .WriteFile (filepath .Join (tmpDir , "alsoignored.txt" ), []byte ("" ), 0644 )
40
41
41
42
reader , writer := io .Pipe ()
42
43
go func () {
@@ -65,6 +66,9 @@ func TestDockerContext(t *testing.T) {
65
66
if files ["ignored.txt" ] {
66
67
t .Error ("File ignored.txt should have been excluded, but was not" )
67
68
}
69
+ if files ["alsoignored.txt" ] {
70
+ t .Error ("File alsoignored.txt should have been excluded, but was not" )
71
+ }
68
72
if files ["files/ignored.txt" ] {
69
73
t .Error ("File files/ignored.txt should have been excluded, but was not" )
70
74
}
0 commit comments