summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-06-09 15:49:21 -0400
committerGitHub <noreply@github.com>2022-06-09 15:49:21 -0400
commite7db6d4893fe4c583dc492f4870a16085f3c9f70 (patch)
tree615e9078760ce3b0b7a2ad382ca5e1b2c266a377 /test
parent0405e7c161dab4cfc9fdc846b83ca585156e25a1 (diff)
parentb13fc1bf983860d0627155ddbbbf28bf09e29a9e (diff)
downloadpodman-e7db6d4893fe4c583dc492f4870a16085f3c9f70.tar.gz
podman-e7db6d4893fe4c583dc492f4870a16085f3c9f70.tar.bz2
podman-e7db6d4893fe4c583dc492f4870a16085f3c9f70.zip
Merge pull request #14480 from cdoern/infra
patch for pod host networking & other host namespace handling
Diffstat (limited to 'test')
-rw-r--r--test/e2e/pod_infra_container_test.go16
1 files changed, 13 insertions, 3 deletions
diff --git a/test/e2e/pod_infra_container_test.go b/test/e2e/pod_infra_container_test.go
index ad2db2411..20794a29c 100644
--- a/test/e2e/pod_infra_container_test.go
+++ b/test/e2e/pod_infra_container_test.go
@@ -130,14 +130,24 @@ var _ = Describe("Podman pod create", func() {
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- session = podmanTest.Podman([]string{"run", "-dt", "--pod", session.OutputToString(), ALPINE})
+ session = podmanTest.Podman([]string{"run", "--name", "hostCtr", "--pod", session.OutputToString(), ALPINE, "readlink", "/proc/self/ns/net"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- session = podmanTest.Podman([]string{"inspect", "--format", "'{{.NetworkSettings.SandboxKey}}'", session.OutputToString()})
+ ns := SystemExec("readlink", []string{"/proc/self/ns/net"})
+ ns.WaitWithDefaultTimeout()
+ Expect(ns).Should(Exit(0))
+ netns := ns.OutputToString()
+ Expect(netns).ToNot(BeEmpty())
+
+ Expect(session.OutputToString()).To(Equal(netns))
+
+ // Sanity Check for podman inspect
+ session = podmanTest.Podman([]string{"inspect", "--format", "'{{.NetworkSettings.SandboxKey}}'", "hostCtr"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- Expect(session.OutputToString()).Should(ContainSubstring("''")) // no network path... host
+ Expect(session.OutputToString()).Should(Equal("''")) // no network path... host
+
})
It("podman pod correctly sets up IPCNS", func() {