diff options
author | Ed Santiago <santiago@redhat.com> | 2021-12-01 08:49:55 -0700 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2021-12-02 07:54:53 -0700 |
commit | c0a8814fb4d55a950ebf2b2c48731ac939318d7e (patch) | |
tree | de7c1c548a5b9486333fe6417bbb659d28dbec33 /test/e2e/search_test.go | |
parent | 92f9e117670bb060307aadbd6bdeee303923091c (diff) | |
download | podman-c0a8814fb4d55a950ebf2b2c48731ac939318d7e.tar.gz podman-c0a8814fb4d55a950ebf2b2c48731ac939318d7e.tar.bz2 podman-c0a8814fb4d55a950ebf2b2c48731ac939318d7e.zip |
Use HaveLen(x) instead of Expect(len(y)).To(Equal(x))
sed -i -e 's/Expect(len(\(.*\)))\.To(Equal(\(.*\)))/Expect(\1).To(HaveLen(\2))/' test/e2e/*.go
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/e2e/search_test.go')
-rw-r--r-- | test/e2e/search_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/e2e/search_test.go b/test/e2e/search_test.go index c67ef7ed2..5c8e7c064 100644 --- a/test/e2e/search_test.go +++ b/test/e2e/search_test.go @@ -175,12 +175,12 @@ registries = ['{{.Host}}:{{.Port}}']` search = podmanTest.Podman([]string{"search", "--limit", "3", "docker.io/alpine"}) search.WaitWithDefaultTimeout() Expect(search).Should(Exit(0)) - Expect(len(search.OutputToStringArray())).To(Equal(4)) + Expect(search.OutputToStringArray()).To(HaveLen(4)) search = podmanTest.Podman([]string{"search", "--limit", "30", "docker.io/alpine"}) search.WaitWithDefaultTimeout() Expect(search).Should(Exit(0)) - Expect(len(search.OutputToStringArray())).To(Equal(31)) + Expect(search.OutputToStringArray()).To(HaveLen(31)) }) It("podman search with filter stars", func() { @@ -462,7 +462,7 @@ registries = ['{{.Host}}:{{.Port}}']` search := podmanTest.Podman([]string{"search", "--limit", "30", "registry.redhat.io/*"}) search.WaitWithDefaultTimeout() Expect(search).Should(Exit(0)) - Expect(len(search.OutputToStringArray())).To(Equal(31)) + Expect(search.OutputToStringArray()).To(HaveLen(31)) search = podmanTest.Podman([]string{"search", "registry.redhat.io/*openshift*"}) search.WaitWithDefaultTimeout() @@ -474,7 +474,7 @@ registries = ['{{.Host}}:{{.Port}}']` search := podmanTest.Podman([]string{"search", "--list-tags", "--limit", "30", "docker.io/library/alpine"}) search.WaitWithDefaultTimeout() Expect(search).Should(Exit(0)) - Expect(len(search.OutputToStringArray())).To(Equal(31)) + Expect(search.OutputToStringArray()).To(HaveLen(31)) search = podmanTest.Podman([]string{"search", "--list-tags", "docker.io/library/alpine"}) search.WaitWithDefaultTimeout() |