From 95a6376899af66bd6c456a1376e4e82cf075934f Mon Sep 17 00:00:00 2001 From: draveness Date: Wed, 15 May 2019 10:08:05 +0800 Subject: [PATCH] feat: use framework.ExpectNoError in e2e apps disruption --- test/e2e/apps/disruption.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/apps/disruption.go b/test/e2e/apps/disruption.go index 61245742e7..d6b11ce374 100644 --- a/test/e2e/apps/disruption.go +++ b/test/e2e/apps/disruption.go @@ -166,7 +166,7 @@ var _ = SIGDescribe("DisruptionController", func() { // Locate a running pod. pod, err := locateRunningPod(cs, ns) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) + framework.ExpectNoError(err) e := &policy.Eviction{ ObjectMeta: metav1.ObjectMeta{ @@ -205,7 +205,7 @@ var _ = SIGDescribe("DisruptionController", func() { ginkgo.By("First trying to evict a pod which shouldn't be evictable") pod, err := locateRunningPod(cs, ns) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) + framework.ExpectNoError(err) waitForPodsOrDie(cs, ns, 3) // make sure that they are running and so would be evictable with a different pdb e := &policy.Eviction{ @@ -223,7 +223,7 @@ var _ = SIGDescribe("DisruptionController", func() { ginkgo.By("Trying to evict the same pod we tried earlier which should now be evictable") waitForPodsOrDie(cs, ns, 3) err = cs.CoreV1().Pods(ns).Evict(e) - gomega.Expect(err).NotTo(gomega.HaveOccurred()) // the eviction is now allowed + framework.ExpectNoError(err) // the eviction is now allowed }) })