From c034147fe72a233b8c1ef33d00e9d0747053c262 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 23 Nov 2021 06:57:41 -0700 Subject: 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 --- test/e2e/ps_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test') 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())) }) -- cgit v1.2.3-54-g00ecf