From 2c24a8a4ea7ea0571cd4e125158fa59f584d2464 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Fri, 10 Apr 2015 17:06:43 -0400 Subject: [PATCH] Move TestCreateNumberHostname to integration-cli Signed-off-by: Brian Goff --- integration-cli/docker_cli_create_test.go | 8 ++++++++ integration/server_test.go | 12 ------------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/integration-cli/docker_cli_create_test.go b/integration-cli/docker_cli_create_test.go index 3a3c2f07df..ac10b264eb 100644 --- a/integration-cli/docker_cli_create_test.go +++ b/integration-cli/docker_cli_create_test.go @@ -305,3 +305,11 @@ func TestCreateLabelFromImage(t *testing.T) { logDone("create - labels from image") } + +func TestCreateHostnameWithNumber(t *testing.T) { + out, _, _ := dockerCmd(t, "run", "-h", "web.0", "busybox", "hostname") + if strings.TrimSpace(out) != "web.0" { + t.Fatalf("hostname not set, expected `web.0`, got: %s", out) + } + logDone("create - use hostname with number") +} diff --git a/integration/server_test.go b/integration/server_test.go index 2a12244a2b..f23d0e675c 100644 --- a/integration/server_test.go +++ b/integration/server_test.go @@ -2,18 +2,6 @@ package docker import "testing" -func TestCreateNumberHostname(t *testing.T) { - eng := NewTestEngine(t) - defer mkDaemonFromEngine(eng, t).Nuke() - - config, _, _, err := parseRun([]string{"-h", "web.0", unitTestImageID, "echo test"}) - if err != nil { - t.Fatal(err) - } - - createTestContainer(eng, config, t) -} - func TestImagesFilter(t *testing.T) { eng := NewTestEngine(t) defer nuke(mkDaemonFromEngine(eng, t))