summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2021-11-23 06:57:41 -0700
committerEd Santiago <santiago@redhat.com>2021-11-23 13:50:35 -0700
commitc034147fe72a233b8c1ef33d00e9d0747053c262 (patch)
tree5dad095333df07b6a56e97a162029bd0904a95cc /test
parent2fcb39586cd1a1b07afd561c1bbd7ba166c44879 (diff)
downloadpodman-c034147fe72a233b8c1ef33d00e9d0747053c262.tar.gz
podman-c034147fe72a233b8c1ef33d00e9d0747053c262.tar.bz2
podman-c034147fe72a233b8c1ef33d00e9d0747053c262.zip
Remove StringInSlice(), part 2
These were NOPs, and were testing the wrong thing (pod ID, not container ID). Fixed manually. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/ps_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go
index 0afd74bcb..666b70b09 100644
--- a/test/e2e/ps_test.go
+++ b/test/e2e/ps_test.go
@@ -792,29 +792,29 @@ var _ = Describe("Podman ps", func() {
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expect(len(session.OutputToStringArray())).To(Equal(2))
- Expect(StringInSlice(pod1.OutputToString(), session.OutputToStringArray()))
+ Expect(session.OutputToStringArray()).To(ContainElement(con1.OutputToString()))
// filter by full pod id
session = podmanTest.Podman([]string{"ps", "-q", "--no-trunc", "--filter", "pod=" + pod1.OutputToString()})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expect(len(session.OutputToStringArray())).To(Equal(2))
- Expect(StringInSlice(pod1.OutputToString(), session.OutputToStringArray()))
+ Expect(session.OutputToStringArray()).To(ContainElement(con1.OutputToString()))
// filter by partial pod id
session = podmanTest.Podman([]string{"ps", "-q", "--no-trunc", "--filter", "pod=" + pod1.OutputToString()[0:12]})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expect(len(session.OutputToStringArray())).To(Equal(2))
- Expect(StringInSlice(pod1.OutputToString(), session.OutputToStringArray()))
+ Expect(session.OutputToStringArray()).To(ContainElement(con1.OutputToString()))
// filter by multiple pods is inclusive
session = podmanTest.Podman([]string{"ps", "-q", "--no-trunc", "--filter", "pod=pod1", "--filter", "pod=pod2"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expect(len(session.OutputToStringArray())).To(Equal(4))
- Expect(StringInSlice(pod1.OutputToString(), session.OutputToStringArray()))
- Expect(StringInSlice(pod2.OutputToString(), session.OutputToStringArray()))
+ Expect(session.OutputToStringArray()).To(ContainElement(con1.OutputToString()))
+ Expect(session.OutputToStringArray()).To(ContainElement(con2.OutputToString()))
})