1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Windows: Enable TestBuildWorkdirImageCmd

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard 2017-01-04 15:33:40 -08:00
parent 4617b66c90
commit 528a5fd2ba

View file

@ -7360,8 +7360,6 @@ func (s *DockerSuite) TestBuildWindowsEnvCaseInsensitive(c *check.C) {
// Test case for 29667
func (s *DockerSuite) TestBuildWorkdirImageCmd(c *check.C) {
testRequires(c, DaemonIsLinux)
image := "testworkdirimagecmd"
dockerfile := `
FROM busybox
@ -7371,7 +7369,13 @@ WORKDIR /foo/bar
c.Assert(err, checker.IsNil, check.Commentf("Output: %s", out))
out, _ = dockerCmd(c, "inspect", "--format", "{{ json .Config.Cmd }}", image)
c.Assert(strings.TrimSpace(out), checker.Equals, `["sh"]`)
// The Windows busybox image has a blank `cmd`
lookingFor := `["sh"]`
if daemonPlatform == "windows" {
lookingFor = "null"
}
c.Assert(strings.TrimSpace(out), checker.Equals, lookingFor)
image = "testworkdirlabelimagecmd"
dockerfile = `
@ -7383,7 +7387,7 @@ LABEL a=b
c.Assert(err, checker.IsNil, check.Commentf("Output: %s", out))
out, _ = dockerCmd(c, "inspect", "--format", "{{ json .Config.Cmd }}", image)
c.Assert(strings.TrimSpace(out), checker.Equals, `["sh"]`)
c.Assert(strings.TrimSpace(out), checker.Equals, lookingFor)
}
// Test case for 28902/28909