Add test for non local mac address.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
This commit is contained in:
Jessica Frazelle 2014-12-22 14:54:55 -08:00
parent 305c898cd7
commit 98d5720594
1 changed files with 12 additions and 0 deletions

View File

@ -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")
}