mirror of
https://github.com/clearlinux/docker.git
synced 2026-06-01 19:44:07 +00:00
Merge pull request #9779 from jfrazelle/9771-non-local-mac-address-test
Add test for non local mac address.
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user