mirror of
https://github.com/containers/podman.git
synced 2026-03-13 08:01:19 +08:00
Merge pull request #10208 from Luap99/play-kube-mac
add --mac-address to podman play kube
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user