summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-01-03 18:42:12 +0100
committerGitHub <noreply@github.com>2022-01-03 18:42:12 +0100
commitaaf90c5596fb2232d915fcd75d4d707d180c1b17 (patch)
tree659695b2bf126520c9da7c3daa29337ea53951d3 /test
parent8ad8faa91f04b132949931b13f8b9a51bd1c1010 (diff)
parentc496001d03f9eac87dfd6f3e3d655c40267b3837 (diff)
downloadpodman-aaf90c5596fb2232d915fcd75d4d707d180c1b17.tar.gz
podman-aaf90c5596fb2232d915fcd75d4d707d180c1b17.tar.bz2
podman-aaf90c5596fb2232d915fcd75d4d707d180c1b17.zip
Merge pull request #12611 from Luap99/ipv6
add --ip6 flag to podman create/run
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_staticip_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/e2e/run_staticip_test.go b/test/e2e/run_staticip_test.go
index eb7dc9d11..2f3c3025a 100644
--- a/test/e2e/run_staticip_test.go
+++ b/test/e2e/run_staticip_test.go
@@ -7,6 +7,7 @@ import (
"time"
. "github.com/containers/podman/v3/test/utils"
+ "github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
@@ -65,6 +66,20 @@ var _ = Describe("Podman run with --ip flag", func() {
Expect(result.OutputToString()).To(ContainSubstring(ip + "/16"))
})
+ It("Podman run with specified static IPv6 has correct IP", func() {
+ netName := "ipv6-" + stringid.GenerateNonCryptoID()
+ ipv6 := "fd46:db93:aa76:ac37::10"
+ net := podmanTest.Podman([]string{"network", "create", "--subnet", "fd46:db93:aa76:ac37::/64", netName})
+ net.WaitWithDefaultTimeout()
+ defer podmanTest.removeCNINetwork(netName)
+ Expect(net).To(Exit(0))
+
+ result := podmanTest.Podman([]string{"run", "-ti", "--network", netName, "--ip6", ipv6, ALPINE, "ip", "addr"})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(0))
+ Expect(result.OutputToString()).To(ContainSubstring(ipv6 + "/64"))
+ })
+
It("Podman run with --network bridge:ip=", func() {
ip := GetRandomIPAddress()
result := podmanTest.Podman([]string{"run", "-ti", "--network", "bridge:ip=" + ip, ALPINE, "ip", "addr"})