Signed-off-by: Darren Stahl <darst@microsoft.com>
| ... | ... |
@@ -813,9 +813,7 @@ RUN [ $(cat "/test dir/test_file6") = 'test6' ]`, |
| 813 | 813 |
} |
| 814 | 814 |
|
| 815 | 815 |
func (s *DockerSuite) TestBuildCopyFileWithWhitespace(c *check.C) {
|
| 816 |
- testRequires(c, DaemonIsLinux) // Not currently passing on Windows |
|
| 817 |
- name := "testcopyfilewithwhitespace" |
|
| 818 |
- ctx, err := fakeContext(`FROM busybox |
|
| 816 |
+ dockerfile := `FROM busybox |
|
| 819 | 817 |
RUN mkdir "/test dir" |
| 820 | 818 |
RUN mkdir "/test_dir" |
| 821 | 819 |
COPY [ "test file1", "/test_file1" ] |
| ... | ... |
@@ -829,7 +827,28 @@ RUN [ $(cat "/test file2") = 'test2' ] |
| 829 | 829 |
RUN [ $(cat "/test file3") = 'test3' ] |
| 830 | 830 |
RUN [ $(cat "/test_dir/test_file4") = 'test4' ] |
| 831 | 831 |
RUN [ $(cat "/test dir/test_file5") = 'test5' ] |
| 832 |
-RUN [ $(cat "/test dir/test_file6") = 'test6' ]`, |
|
| 832 |
+RUN [ $(cat "/test dir/test_file6") = 'test6' ]` |
|
| 833 |
+ |
|
| 834 |
+ if daemonPlatform == "windows" {
|
|
| 835 |
+ dockerfile = `FROM windowsservercore |
|
| 836 |
+RUN mkdir "C:/test dir" |
|
| 837 |
+RUN mkdir "C:/test_dir" |
|
| 838 |
+COPY [ "test file1", "/test_file1" ] |
|
| 839 |
+COPY [ "test_file2", "/test file2" ] |
|
| 840 |
+COPY [ "test file3", "/test file3" ] |
|
| 841 |
+COPY [ "test dir/test_file4", "/test_dir/test_file4" ] |
|
| 842 |
+COPY [ "test_dir/test_file5", "/test dir/test_file5" ] |
|
| 843 |
+COPY [ "test dir/test_file6", "/test dir/test_file6" ] |
|
| 844 |
+RUN find "test1" "C:/test_file1" |
|
| 845 |
+RUN find "test2" "C:/test file2" |
|
| 846 |
+RUN find "test3" "C:/test file3" |
|
| 847 |
+RUN find "test4" "C:/test_dir/test_file4" |
|
| 848 |
+RUN find "test5" "C:/test dir/test_file5" |
|
| 849 |
+RUN find "test6" "C:/test dir/test_file6"` |
|
| 850 |
+ } |
|
| 851 |
+ |
|
| 852 |
+ name := "testcopyfilewithwhitespace" |
|
| 853 |
+ ctx, err := fakeContext(dockerfile, |
|
| 833 | 854 |
map[string]string{
|
| 834 | 855 |
"test file1": "test1", |
| 835 | 856 |
"test_file2": "test2", |
| ... | ... |
@@ -2022,7 +2041,6 @@ func (s *DockerSuite) TestBuildPATH(c *check.C) {
|
| 2022 | 2022 |
} |
| 2023 | 2023 |
|
| 2024 | 2024 |
func (s *DockerSuite) TestBuildContextCleanup(c *check.C) {
|
| 2025 |
- testRequires(c, DaemonIsLinux) |
|
| 2026 | 2025 |
testRequires(c, SameHostDaemon) |
| 2027 | 2026 |
|
| 2028 | 2027 |
name := "testbuildcontextcleanup" |
| ... | ... |
@@ -2031,7 +2049,7 @@ func (s *DockerSuite) TestBuildContextCleanup(c *check.C) {
|
| 2031 | 2031 |
c.Fatalf("failed to list contents of tmp dir: %s", err)
|
| 2032 | 2032 |
} |
| 2033 | 2033 |
_, err = buildImage(name, |
| 2034 |
- `FROM scratch |
|
| 2034 |
+ `FROM `+minimalBaseImage()+` |
|
| 2035 | 2035 |
ENTRYPOINT ["/bin/echo"]`, |
| 2036 | 2036 |
true) |
| 2037 | 2037 |
if err != nil {
|