From 2ef01256f0b2871b433cd07c8bafa2a340b3eb93 Mon Sep 17 00:00:00 2001 From: Jessica Frazelle Date: Mon, 22 Dec 2014 14:54:55 -0800 Subject: [PATCH] Add test for non local mac address. Docker-DCO-1.1-Signed-off-by: Jessica Frazelle (github: jfrazelle) Upstream-commit: 98d5720594d275071f43fbf90daf5fcd1166df8b Component: engine --- .../engine/integration-cli/docker_cli_run_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/engine/integration-cli/docker_cli_run_test.go b/components/engine/integration-cli/docker_cli_run_test.go index 0e1d3aff47..6b32f1be27 100644 --- a/components/engine/integration-cli/docker_cli_run_test.go +++ b/components/engine/integration-cli/docker_cli_run_test.go @@ -2693,3 +2693,15 @@ func TestRunTtyWithPipe(t *testing.T) { logDone("run - forbid piped stdin with tty") } + +func TestRunNonLocalMacAddress(t *testing.T) { + defer deleteAllContainers() + addr := "00:16:3E:08:00:50" + + cmd := exec.Command(dockerBinary, "run", "--mac-address", addr, "busybox", "ifconfig") + if out, _, err := runCommandWithOutput(cmd); err != nil || !strings.Contains(out, addr) { + t.Fatalf("Output should have contained %q: %s, %v", addr, out, err) + } + + logDone("run - use non-local mac-address") +}