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>
This commit is contained in:
cdoern
2022-06-07 10:43:51 -04:00
parent 96f9d0dc0e
commit ed1e4f94fb
2 changed files with 32 additions and 0 deletions

View File

@@ -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"))
})
})