summaryrefslogtreecommitdiff
path: root/test/e2e/search_test.go
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2021-11-30 09:15:44 -0700
committerEd Santiago <santiago@redhat.com>2021-11-30 09:51:06 -0700
commit12787963b04f91a7fec9aa0d6915666e43aeb269 (patch)
treea20496b9a5221c6bd042fd5ad93c46f61a3f228f /test/e2e/search_test.go
parent3fac03cf04e68eb3351aff8c33bac6bea85810f6 (diff)
downloadpodman-12787963b04f91a7fec9aa0d6915666e43aeb269.tar.gz
podman-12787963b04f91a7fec9aa0d6915666e43aeb269.tar.bz2
podman-12787963b04f91a7fec9aa0d6915666e43aeb269.zip
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>
Diffstat (limited to 'test/e2e/search_test.go')
-rw-r--r--test/e2e/search_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/e2e/search_test.go b/test/e2e/search_test.go
index 2ea88eb5e..54bc5252e 100644
--- a/test/e2e/search_test.go
+++ b/test/e2e/search_test.go
@@ -134,7 +134,7 @@ registries = ['{{.Host}}:{{.Port}}']`
search := podmanTest.Podman([]string{"search", "--format", "json", "alpine"})
search.WaitWithDefaultTimeout()
Expect(search).Should(Exit(0))
- Expect(search.IsJSONOutputValid()).To(BeTrue())
+ Expect(search.OutputToString()).To(BeValidJSON())
Expect(search.OutputToString()).To(ContainSubstring("docker.io/library/alpine"))
// Test for https://github.com/containers/podman/issues/11894
@@ -151,7 +151,7 @@ registries = ['{{.Host}}:{{.Port}}']`
search := podmanTest.Podman([]string{"search", "--list-tags", "--format", "json", "alpine"})
search.WaitWithDefaultTimeout()
Expect(search).Should(Exit(0))
- Expect(search.IsJSONOutputValid()).To(BeTrue())
+ Expect(search.OutputToString()).To(BeValidJSON())
Expect(search.OutputToString()).To(ContainSubstring("docker.io/library/alpine"))
Expect(search.OutputToString()).To(ContainSubstring("3.10"))
Expect(search.OutputToString()).To(ContainSubstring("2.7"))