Signed-off-by: Brian Goff <cpuguy83@gmail.com>
| ... | ... |
@@ -305,3 +305,11 @@ func TestCreateLabelFromImage(t *testing.T) {
|
| 305 | 305 |
|
| 306 | 306 |
logDone("create - labels from image")
|
| 307 | 307 |
} |
| 308 |
+ |
|
| 309 |
+func TestCreateHostnameWithNumber(t *testing.T) {
|
|
| 310 |
+ out, _, _ := dockerCmd(t, "run", "-h", "web.0", "busybox", "hostname") |
|
| 311 |
+ if strings.TrimSpace(out) != "web.0" {
|
|
| 312 |
+ t.Fatalf("hostname not set, expected `web.0`, got: %s", out)
|
|
| 313 |
+ } |
|
| 314 |
+ logDone("create - use hostname with number")
|
|
| 315 |
+} |
| ... | ... |
@@ -2,18 +2,6 @@ package docker |
| 2 | 2 |
|
| 3 | 3 |
import "testing" |
| 4 | 4 |
|
| 5 |
-func TestCreateNumberHostname(t *testing.T) {
|
|
| 6 |
- eng := NewTestEngine(t) |
|
| 7 |
- defer mkDaemonFromEngine(eng, t).Nuke() |
|
| 8 |
- |
|
| 9 |
- config, _, _, err := parseRun([]string{"-h", "web.0", unitTestImageID, "echo test"})
|
|
| 10 |
- if err != nil {
|
|
| 11 |
- t.Fatal(err) |
|
| 12 |
- } |
|
| 13 |
- |
|
| 14 |
- createTestContainer(eng, config, t) |
|
| 15 |
-} |
|
| 16 |
- |
|
| 17 | 5 |
func TestImagesFilter(t *testing.T) {
|
| 18 | 6 |
eng := NewTestEngine(t) |
| 19 | 7 |
defer nuke(mkDaemonFromEngine(eng, t)) |