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

Refactor docker_cli_build_test.go

Use `testutil/cmd` for `buildCommand`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2017-01-10 19:16:25 +01:00
parent 96f7cf254b
commit c778f4b964
4 changed files with 1437 additions and 2744 deletions

View File

@ -195,7 +195,7 @@ func (s *DockerSuite) TestCreateLabels(c *check.C) {
dockerCmd(c, "create", "--name", name, "-l", "k1=v1", "--label", "k2=v2", "busybox")
actual := make(map[string]string)
inspectFieldAndMarshall(c, name, "Config.Labels", &actual)
inspectFieldAndUnmarshall(c, name, "Config.Labels", &actual)
if !reflect.DeepEqual(expected, actual) {
c.Fatalf("Expected %s got %s", expected, actual)
@ -216,7 +216,7 @@ func (s *DockerSuite) TestCreateLabelFromImage(c *check.C) {
dockerCmd(c, "create", "--name", name, "-l", "k2=x", "--label", "k3=v3", imageName)
actual := make(map[string]string)
inspectFieldAndMarshall(c, name, "Config.Labels", &actual)
inspectFieldAndUnmarshall(c, name, "Config.Labels", &actual)
if !reflect.DeepEqual(expected, actual) {
c.Fatalf("Expected %s got %s", expected, actual)