mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Windows: Enable more build tests
Signed-off-by: Darren Stahl <darst@microsoft.com>
This commit is contained in:
parent
e08b2f7a08
commit
e79b0b42f0
1 changed files with 24 additions and 6 deletions
|
@ -813,9 +813,7 @@ RUN [ $(cat "/test dir/test_file6") = 'test6' ]`,
|
|||
}
|
||||
|
||||
func (s *DockerSuite) TestBuildCopyFileWithWhitespace(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux) // Not currently passing on Windows
|
||||
name := "testcopyfilewithwhitespace"
|
||||
ctx, err := fakeContext(`FROM busybox
|
||||
dockerfile := `FROM busybox
|
||||
RUN mkdir "/test dir"
|
||||
RUN mkdir "/test_dir"
|
||||
COPY [ "test file1", "/test_file1" ]
|
||||
|
@ -829,7 +827,28 @@ RUN [ $(cat "/test file2") = 'test2' ]
|
|||
RUN [ $(cat "/test file3") = 'test3' ]
|
||||
RUN [ $(cat "/test_dir/test_file4") = 'test4' ]
|
||||
RUN [ $(cat "/test dir/test_file5") = 'test5' ]
|
||||
RUN [ $(cat "/test dir/test_file6") = 'test6' ]`,
|
||||
RUN [ $(cat "/test dir/test_file6") = 'test6' ]`
|
||||
|
||||
if daemonPlatform == "windows" {
|
||||
dockerfile = `FROM windowsservercore
|
||||
RUN mkdir "C:/test dir"
|
||||
RUN mkdir "C:/test_dir"
|
||||
COPY [ "test file1", "/test_file1" ]
|
||||
COPY [ "test_file2", "/test file2" ]
|
||||
COPY [ "test file3", "/test file3" ]
|
||||
COPY [ "test dir/test_file4", "/test_dir/test_file4" ]
|
||||
COPY [ "test_dir/test_file5", "/test dir/test_file5" ]
|
||||
COPY [ "test dir/test_file6", "/test dir/test_file6" ]
|
||||
RUN find "test1" "C:/test_file1"
|
||||
RUN find "test2" "C:/test file2"
|
||||
RUN find "test3" "C:/test file3"
|
||||
RUN find "test4" "C:/test_dir/test_file4"
|
||||
RUN find "test5" "C:/test dir/test_file5"
|
||||
RUN find "test6" "C:/test dir/test_file6"`
|
||||
}
|
||||
|
||||
name := "testcopyfilewithwhitespace"
|
||||
ctx, err := fakeContext(dockerfile,
|
||||
map[string]string{
|
||||
"test file1": "test1",
|
||||
"test_file2": "test2",
|
||||
|
@ -2022,7 +2041,6 @@ func (s *DockerSuite) TestBuildPATH(c *check.C) {
|
|||
}
|
||||
|
||||
func (s *DockerSuite) TestBuildContextCleanup(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux)
|
||||
testRequires(c, SameHostDaemon)
|
||||
|
||||
name := "testbuildcontextcleanup"
|
||||
|
@ -2031,7 +2049,7 @@ func (s *DockerSuite) TestBuildContextCleanup(c *check.C) {
|
|||
c.Fatalf("failed to list contents of tmp dir: %s", err)
|
||||
}
|
||||
_, err = buildImage(name,
|
||||
`FROM scratch
|
||||
`FROM `+minimalBaseImage()+`
|
||||
ENTRYPOINT ["/bin/echo"]`,
|
||||
true)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue