mirror of
https://github.com/containers/podman.git
synced 2025-06-19 16:33:24 +08:00
Merge pull request #5929 from QiWang19/v2test-info
Fix v2 test podman info
This commit is contained in:
@ -16,7 +16,6 @@ var _ = Describe("Podman Info", func() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
Skip(v2fail)
|
|
||||||
tempdir, err = CreateTempDirInTempDir()
|
tempdir, err = CreateTempDirInTempDir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
@ -38,22 +37,17 @@ var _ = Describe("Podman Info", func() {
|
|||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(0))
|
||||||
|
|
||||||
})
|
})
|
||||||
It("podman system info json output", func() {
|
|
||||||
session := podmanTest.Podman([]string{"system", "info", "--format=json"})
|
|
||||||
session.WaitWithDefaultTimeout()
|
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
|
||||||
|
|
||||||
})
|
It("podman info --format GO template", func() {
|
||||||
It("podman info --format JSON GO template", func() {
|
session := podmanTest.Podman([]string{"info", "--format", "{{.Store.GraphRoot}}"})
|
||||||
session := podmanTest.Podman([]string{"info", "--format", "{{ json .}}"})
|
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(0))
|
||||||
Expect(session.IsJSONOutputValid()).To(BeTrue())
|
|
||||||
})
|
})
|
||||||
|
|
||||||
It("podman info --format GO template", func() {
|
It("podman info --format GO template", func() {
|
||||||
session := podmanTest.Podman([]string{"info", "--format", "{{ .Store.GraphRoot }}"})
|
session := podmanTest.Podman([]string{"info", "--format", "{{.Registries}}"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(0))
|
||||||
|
Expect(session.OutputToString()).To(ContainSubstring("registry"))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user