mirror of
https://github.com/containers/podman
synced 2024-10-20 17:23:30 +00:00
367213a394
Made a change to make sure that the output paths of podman inspect matches that of docker inspect. For example to get the stop signal you should be able to do podman inspect ctr --format {{.Config.StopSignal}} and the same thing in docker will give the same results. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #292 Approved by: rhatdan
58 lines
1.4 KiB
Go
58 lines
1.4 KiB
Go
package integration
|
|
|
|
import (
|
|
"os"
|
|
|
|
. "github.com/onsi/ginkgo"
|
|
. "github.com/onsi/gomega"
|
|
)
|
|
|
|
var _ = Describe("Podman create", func() {
|
|
var (
|
|
tempdir string
|
|
err error
|
|
podmanTest PodmanTest
|
|
)
|
|
|
|
BeforeEach(func() {
|
|
tempdir, err = CreateTempDirInTempDir()
|
|
if err != nil {
|
|
os.Exit(1)
|
|
}
|
|
podmanTest = PodmanCreate(tempdir)
|
|
podmanTest.RestoreAllArtifacts()
|
|
})
|
|
|
|
AfterEach(func() {
|
|
podmanTest.Cleanup()
|
|
|
|
})
|
|
|
|
It("podman create container based on a local image", func() {
|
|
session := podmanTest.Podman([]string{"create", ALPINE, "ls"})
|
|
session.WaitWithDefaultTimeout()
|
|
cid := session.OutputToString()
|
|
Expect(session.ExitCode()).To(Equal(0))
|
|
Expect(podmanTest.NumberOfContainers()).To(Equal(1))
|
|
|
|
check := podmanTest.Podman([]string{"inspect", "-l"})
|
|
check.WaitWithDefaultTimeout()
|
|
data := check.InspectContainerToJSON()
|
|
Expect(data.ID).To(ContainSubstring(cid))
|
|
})
|
|
|
|
It("podman create container based on a remote image", func() {
|
|
session := podmanTest.Podman([]string{"create", BB_GLIBC, "ls"})
|
|
session.WaitWithDefaultTimeout()
|
|
Expect(session.ExitCode()).To(Equal(0))
|
|
Expect(podmanTest.NumberOfContainers()).To(Equal(1))
|
|
})
|
|
|
|
It("podman create using short options", func() {
|
|
session := podmanTest.Podman([]string{"create", ALPINE, "ls"})
|
|
session.WaitWithDefaultTimeout()
|
|
Expect(session.ExitCode()).To(Equal(0))
|
|
Expect(podmanTest.NumberOfContainers()).To(Equal(1))
|
|
})
|
|
})
|