Add cli build warning about chmod bits on windows

This shows a warning message about adjusted file/directory permission bits
when the `docker build` cli command is executed on windows.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
This commit is contained in:
Ahmet Alp Balkan
2015-03-20 20:13:32 +00:00
parent 88924993a2
commit 4a8b3cad60
2 changed files with 20 additions and 2 deletions
+13 -2
View File
@@ -4551,8 +4551,19 @@ func TestBuildStderr(t *testing.T) {
if err != nil {
t.Fatal(err)
}
if stderr != "" {
t.Fatalf("Stderr should have been empty, instead its: %q", stderr)
if runtime.GOOS == "windows" {
// stderr might contain a security warning on windows
lines := strings.Split(stderr, "\n")
for _, v := range lines {
if v != "" && !strings.Contains(v, "SECURITY WARNING:") {
t.Fatalf("Stderr contains unexpected output line: %q", v)
}
}
} else {
if stderr != "" {
t.Fatalf("Stderr should have been empty, instead its: %q", stderr)
}
}
logDone("build - testing stderr")
}