mirror of
https://github.com/containers/podman.git
synced 2025-11-03 07:47:19 +08:00
create pod on the fly
when a user specifies --pod to podman create|run, we should create that pod automatically. the port bindings from the container are then inherited by the infra container. this signicantly improves the workflow of running containers inside pods with podman. the user is still encouraged to use podman pod create to have more granular control of the pod create options. Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
@ -628,4 +628,15 @@ USER mail`
|
||||
isSharedOnly := !strings.Contains(shared[0], "shared,")
|
||||
Expect(isSharedOnly).Should(BeTrue())
|
||||
})
|
||||
|
||||
It("podman run --pod automatically", func() {
|
||||
session := podmanTest.Podman([]string{"run", "--pod", "new:foobar", ALPINE, "ls"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
check := podmanTest.Podman([]string{"pod", "ps", "--no-trunc"})
|
||||
check.WaitWithDefaultTimeout()
|
||||
match, _ := check.GrepString("foobar")
|
||||
Expect(match).To(BeTrue())
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user