mirror of
https://github.com/containers/podman.git
synced 2025-05-31 15:42:48 +08:00
Add tests to make sure podman container and podman image commands work
We have little to no testing to make sure we don't break podman image and podman container commands that wrap traditional commands. This PR adds tests for each of the commands. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -60,6 +60,19 @@ var _ = Describe("Podman port", func() {
|
||||
Expect(result.LineInOuputStartsWith(fmt.Sprintf("80/tcp -> 0.0.0.0:%s", port))).To(BeTrue())
|
||||
})
|
||||
|
||||
It("podman container port -l nginx", func() {
|
||||
podmanTest.RestoreArtifact(nginx)
|
||||
session := podmanTest.Podman([]string{"container", "run", "-dt", "-P", nginx})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
result := podmanTest.Podman([]string{"container", "port", "-l"})
|
||||
result.WaitWithDefaultTimeout()
|
||||
Expect(result.ExitCode()).To(Equal(0))
|
||||
port := strings.Split(result.OutputToStringArray()[0], ":")[1]
|
||||
Expect(result.LineInOuputStartsWith(fmt.Sprintf("80/tcp -> 0.0.0.0:%s", port))).To(BeTrue())
|
||||
})
|
||||
|
||||
It("podman port -l port nginx", func() {
|
||||
podmanTest.RestoreArtifact(nginx)
|
||||
session := podmanTest.Podman([]string{"run", "-dt", "-P", nginx})
|
||||
|
Reference in New Issue
Block a user