mirror of
https://github.com/moby/moby.git
synced 2025-08-01 05:47:11 +03:00
Windows: Enable more build tests
Signed-off-by: Darren Stahl <darst@microsoft.com>
This commit is contained in:
@ -813,9 +813,7 @@ RUN [ $(cat "/test dir/test_file6") = 'test6' ]`,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildCopyFileWithWhitespace(c *check.C) {
|
func (s *DockerSuite) TestBuildCopyFileWithWhitespace(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux) // Not currently passing on Windows
|
dockerfile := `FROM busybox
|
||||||
name := "testcopyfilewithwhitespace"
|
|
||||||
ctx, err := fakeContext(`FROM busybox
|
|
||||||
RUN mkdir "/test dir"
|
RUN mkdir "/test dir"
|
||||||
RUN mkdir "/test_dir"
|
RUN mkdir "/test_dir"
|
||||||
COPY [ "test file1", "/test_file1" ]
|
COPY [ "test file1", "/test_file1" ]
|
||||||
@ -829,7 +827,28 @@ RUN [ $(cat "/test file2") = 'test2' ]
|
|||||||
RUN [ $(cat "/test file3") = 'test3' ]
|
RUN [ $(cat "/test file3") = 'test3' ]
|
||||||
RUN [ $(cat "/test_dir/test_file4") = 'test4' ]
|
RUN [ $(cat "/test_dir/test_file4") = 'test4' ]
|
||||||
RUN [ $(cat "/test dir/test_file5") = 'test5' ]
|
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{
|
map[string]string{
|
||||||
"test file1": "test1",
|
"test file1": "test1",
|
||||||
"test_file2": "test2",
|
"test_file2": "test2",
|
||||||
@ -2022,7 +2041,6 @@ func (s *DockerSuite) TestBuildPATH(c *check.C) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildContextCleanup(c *check.C) {
|
func (s *DockerSuite) TestBuildContextCleanup(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux)
|
|
||||||
testRequires(c, SameHostDaemon)
|
testRequires(c, SameHostDaemon)
|
||||||
|
|
||||||
name := "testbuildcontextcleanup"
|
name := "testbuildcontextcleanup"
|
||||||
@ -2031,7 +2049,7 @@ func (s *DockerSuite) TestBuildContextCleanup(c *check.C) {
|
|||||||
c.Fatalf("failed to list contents of tmp dir: %s", err)
|
c.Fatalf("failed to list contents of tmp dir: %s", err)
|
||||||
}
|
}
|
||||||
_, err = buildImage(name,
|
_, err = buildImage(name,
|
||||||
`FROM scratch
|
`FROM `+minimalBaseImage()+`
|
||||||
ENTRYPOINT ["/bin/echo"]`,
|
ENTRYPOINT ["/bin/echo"]`,
|
||||||
true)
|
true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user