summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorcdoern <cdoern@redhat.com>2022-06-07 10:43:51 -0400
committercdoern <cdoern@redhat.com>2022-06-07 11:42:16 -0400
commited1e4f94fb35bc727a921c28cea3ba0f94fc9121 (patch)
treedcceba8862ee98b0780427b017f2d81bde8fce72 /test/e2e
parent96f9d0dc0e0dbb796494af573c67e194e60aebcd (diff)
downloadpodman-ed1e4f94fb35bc727a921c28cea3ba0f94fc9121.tar.gz
podman-ed1e4f94fb35bc727a921c28cea3ba0f94fc9121.tar.bz2
podman-ed1e4f94fb35bc727a921c28cea3ba0f94fc9121.zip
Infra Inheritance patch
infra was overriding options that it should be appending rather than resetting. fix this by appending the given container's spec to the compatible options before marshaling/unmarshaling resolves #14454 Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/pod_create_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index dedb1caeb..4919cc670 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -1112,4 +1112,26 @@ ENTRYPOINT ["sleep","99999"]
})
+ It("podman pod create infra inheritance test", func() {
+ volName := "testVol1"
+ volCreate := podmanTest.Podman([]string{"volume", "create", volName})
+ volCreate.WaitWithDefaultTimeout()
+ Expect(volCreate).Should(Exit(0))
+
+ session := podmanTest.Podman([]string{"pod", "create", "-v", volName + ":/vol1"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ volName2 := "testVol2"
+ volCreate = podmanTest.Podman([]string{"volume", "create", volName2})
+ volCreate.WaitWithDefaultTimeout()
+ Expect(volCreate).Should(Exit(0))
+
+ session = podmanTest.Podman([]string{"run", "--pod", session.OutputToString(), "-v", volName2 + ":/vol2", ALPINE, "mount"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ Expect(session.OutputToString()).Should(ContainSubstring("/vol1"))
+ Expect(session.OutputToString()).Should(ContainSubstring("/vol2"))
+ })
+
})