summaryrefslogtreecommitdiff
path: root/test/e2e/unshare_test.go
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2021-03-29 18:57:54 +0200
committerPaul Holzinger <paul.holzinger@web.de>2021-04-07 15:54:12 +0200
commit0a39ad196cf4af601b0ea32b2c0e0490c9079377 (patch)
treebb13c7343185c3c42356b16a4e9f55508ea6f786 /test/e2e/unshare_test.go
parent0e67053b9a26f20e5ccbffdcc5e7a84254ca16b8 (diff)
downloadpodman-0a39ad196cf4af601b0ea32b2c0e0490c9079377.tar.gz
podman-0a39ad196cf4af601b0ea32b2c0e0490c9079377.tar.bz2
podman-0a39ad196cf4af601b0ea32b2c0e0490c9079377.zip
podman unshare: add --rootless-cni to join the ns
Add a new --rootless-cni option to podman unshare to also join the rootless-cni network namespace. This is useful if you want to connect to a rootless container via IP address. This is only possible from the rootless-cni namespace and not from the host namespace. This option also helps to debug problems in the rootless-cni namespace. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'test/e2e/unshare_test.go')
-rw-r--r--test/e2e/unshare_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/e2e/unshare_test.go b/test/e2e/unshare_test.go
index 515b3a42e..24ab98916 100644
--- a/test/e2e/unshare_test.go
+++ b/test/e2e/unshare_test.go
@@ -49,4 +49,11 @@ var _ = Describe("Podman unshare", func() {
ok, _ := session.GrepString(userNS)
Expect(ok).To(BeFalse())
})
+
+ It("podman unshare --rootles-cni", func() {
+ session := podmanTest.Podman([]string{"unshare", "--rootless-cni", "ip", "addr"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(ContainSubstring("tap0"))
+ })
})