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:
@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user