summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2021-05-04 17:06:57 +0200
committerPaul Holzinger <paul.holzinger@web.de>2021-05-04 20:14:13 +0200
commitfb7d16c7a841bbe2c02cb97b2820334b617e7f44 (patch)
treebb82d46a3565624611c0696ef51efd903e82e6c1 /test/e2e
parentdea6189982b4d128aa1ae9ce379a1f94b4eb8a8f (diff)
downloadpodman-fb7d16c7a841bbe2c02cb97b2820334b617e7f44.tar.gz
podman-fb7d16c7a841bbe2c02cb97b2820334b617e7f44.tar.bz2
podman-fb7d16c7a841bbe2c02cb97b2820334b617e7f44.zip
add --mac-address to podman play kube
Add a new --mac-address flag to podman play kube. This is used to specify a static MAC address which should be used for the pod. This option can be specified several times because play kube can create more than one pod. Fixes #9731 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/play_kube_test.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go
index f89da4c05..836fbe1ee 100644
--- a/test/e2e/play_kube_test.go
+++ b/test/e2e/play_kube_test.go
@@ -1717,7 +1717,7 @@ spec:
}
})
- It("podman play kube --ip", func() {
+ It("podman play kube --ip and --mac-address", func() {
var i, numReplicas int32
numReplicas = 3
deployment := getDeployment(withReplicas(numReplicas))
@@ -1735,6 +1735,10 @@ spec:
for _, ip := range ips {
playArgs = append(playArgs, "--ip", ip)
}
+ macs := []string{"e8:d8:82:c9:80:40", "e8:d8:82:c9:80:50", "e8:d8:82:c9:80:60"}
+ for _, mac := range macs {
+ playArgs = append(playArgs, "--mac-address", mac)
+ }
kube := podmanTest.Podman(append(playArgs, kubeYaml))
kube.WaitWithDefaultTimeout()
@@ -1747,6 +1751,13 @@ spec:
Expect(inspect.ExitCode()).To(Equal(0))
Expect(inspect.OutputToString()).To(Equal(ips[i]))
}
+
+ for i = 0; i < numReplicas; i++ {
+ inspect := podmanTest.Podman([]string{"inspect", getCtrNameInPod(&podNames[i]), "--format", "{{ .NetworkSettings.Networks." + net + ".MacAddress }}"})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect.ExitCode()).To(Equal(0))
+ Expect(inspect.OutputToString()).To(Equal(macs[i]))
+ }
})
It("podman play kube test with network portbindings", func() {