diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-01-03 18:42:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-03 18:42:12 +0100 |
commit | aaf90c5596fb2232d915fcd75d4d707d180c1b17 (patch) | |
tree | 659695b2bf126520c9da7c3daa29337ea53951d3 /test | |
parent | 8ad8faa91f04b132949931b13f8b9a51bd1c1010 (diff) | |
parent | c496001d03f9eac87dfd6f3e3d655c40267b3837 (diff) | |
download | podman-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.go | 15 |
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"}) |