mirror of
https://github.com/containers/podman.git
synced 2025-06-17 06:57:43 +08:00
Fix podman generate tests that relied on play kube
Signed-off-by: Aditya Kamath <theunrealgeek@gmail.com>
This commit is contained in:
@ -280,7 +280,8 @@ var _ = Describe("Podman generate kube", func() {
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
inspect1 := podmanTest.Podman([]string{"inspect", "--format", "{{.Config.User}}", "test1"})
|
||||
// container name in pod is <podName>-<ctrName>
|
||||
inspect1 := podmanTest.Podman([]string{"inspect", "--format", "{{.Config.User}}", "toppod-test1"})
|
||||
inspect1.WaitWithDefaultTimeout()
|
||||
Expect(inspect1.ExitCode()).To(Equal(0))
|
||||
Expect(inspect1.OutputToString()).To(ContainSubstring(inspect.OutputToString()))
|
||||
@ -293,6 +294,7 @@ var _ = Describe("Podman generate kube", func() {
|
||||
|
||||
// we need a container name because IDs don't persist after rm/play
|
||||
ctrName := "test-ctr"
|
||||
ctrNameInKubePod := "test1-test-ctr"
|
||||
|
||||
session1 := podmanTest.Podman([]string{"run", "-d", "--pod", "new:test1", "--name", ctrName, "-v", vol1 + ":/volume/:z", "alpine", "top"})
|
||||
session1.WaitWithDefaultTimeout()
|
||||
@ -311,7 +313,7 @@ var _ = Describe("Podman generate kube", func() {
|
||||
play.WaitWithDefaultTimeout()
|
||||
Expect(play.ExitCode()).To(Equal(0))
|
||||
|
||||
inspect := podmanTest.Podman([]string{"inspect", ctrName})
|
||||
inspect := podmanTest.Podman([]string{"inspect", ctrNameInKubePod})
|
||||
inspect.WaitWithDefaultTimeout()
|
||||
Expect(inspect.ExitCode()).To(Equal(0))
|
||||
Expect(inspect.OutputToString()).To(ContainSubstring(vol1))
|
||||
|
Reference in New Issue
Block a user