Merge pull request #24949 from Microsoft/jjh/tasklist-tlist

Windows: nanoserver TestBuildCmdShellArgsEscaped
This commit is contained in:
Vincent Demeester 2016-07-25 22:58:09 +02:00 committed by GitHub
commit 8f11896a45

View file

@ -6947,10 +6947,9 @@ func (s *DockerSuite) TestBuildShellWindowsPowershell(c *check.C) {
func (s *DockerSuite) TestBuildCmdShellArgsEscaped(c *check.C) {
testRequires(c, DaemonIsWindows)
name := "testbuildcmdshellescaped"
_, err := buildImage(name, `
FROM `+minimalBaseImage()+`
CMD "tasklist"
CMD "ipconfig"
`, true)
if err != nil {
c.Fatal(err)
@ -6963,7 +6962,7 @@ func (s *DockerSuite) TestBuildCmdShellArgsEscaped(c *check.C) {
dockerCmd(c, "wait", "inspectme")
res = inspectFieldJSON(c, name, "Config.Cmd")
if res != `["cmd","/S","/C","\"tasklist\""]` {
if res != `["cmd","/S","/C","\"ipconfig\""]` {
c.Fatalf("CMD was not escaped Config.Cmd: got %v", res)
}
}