mirror of
https://github.com/containers/podman.git
synced 2025-06-19 08:09:12 +08:00
e2e tests: more cleanup of BeTrue()s
Write a BeValidJSON() matcher, and replace IsJSONOutputValid(): sed -i -e 's/Expect(\(.*\)\.IsJSONOutputValid()).To(BeTrue())/Expect(\1.OutputToString())\.To(BeValidJSON())/' test/e2e/*_test.go (Plus a few manual tweaks) Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
@ -78,7 +78,7 @@ var _ = Describe("Podman mount", func() {
|
||||
j := podmanTest.Podman([]string{"mount", "--format=json"})
|
||||
j.WaitWithDefaultTimeout()
|
||||
Expect(j).Should(Exit(0))
|
||||
Expect(j.IsJSONOutputValid()).To(BeTrue())
|
||||
Expect(j.OutputToString()).To(BeValidJSON())
|
||||
|
||||
j = podmanTest.Podman([]string{"mount", "--format='{{.foobar}}'"})
|
||||
j.WaitWithDefaultTimeout()
|
||||
@ -332,7 +332,7 @@ var _ = Describe("Podman mount", func() {
|
||||
j := podmanTest.Podman([]string{"image", "mount", "--format=json"})
|
||||
j.WaitWithDefaultTimeout()
|
||||
Expect(j).Should(Exit(0))
|
||||
Expect(j.IsJSONOutputValid()).To(BeTrue())
|
||||
Expect(j.OutputToString()).To(BeValidJSON())
|
||||
|
||||
umount := podmanTest.Podman([]string{"image", "umount", fedoraMinimal})
|
||||
umount.WaitWithDefaultTimeout()
|
||||
|
Reference in New Issue
Block a user