1
0
mirror of https://github.com/moby/moby.git synced 2025-07-29 07:21:35 +03:00

Windows: Builder case insensitive env

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard
2016-11-22 11:26:02 -08:00
parent 937027a0cb
commit 49f392ff6b
6 changed files with 177 additions and 122 deletions

View File

@ -7311,3 +7311,19 @@ RUN ["cat", "/foo/file"]
c.Fatal(err)
}
}
// Case-insensitive environment variables on Windows
func (s *DockerSuite) TestBuildWindowsEnvCaseInsensitive(c *check.C) {
testRequires(c, DaemonIsWindows)
name := "testbuildwindowsenvcaseinsensitive"
if _, err := buildImage(name, `
FROM `+WindowsBaseImage+`
ENV FOO=bar foo=bar
`, true); err != nil {
c.Fatal(err)
}
res := inspectFieldJSON(c, name, "Config.Env")
if res != `["foo=bar"]` { // Should not have FOO=bar in it - takes the last one processed. And only one entry as deduped.
c.Fatalf("Case insensitive environment variables on Windows failed. Got %s", res)
}
}