Skip to content

Commit 1284c99

Browse files
authored
Merge pull request kubernetes#77894 from draveness/feature/refactor-test-e2e-apps
feat: use framework.ExpectNoError in e2e apps disruption
2 parents 066549b + 95a6376 commit 1284c99

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/e2e/apps/disruption.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ var _ = SIGDescribe("DisruptionController", func() {
166166

167167
// Locate a running pod.
168168
pod, err := locateRunningPod(cs, ns)
169-
gomega.Expect(err).NotTo(gomega.HaveOccurred())
169+
framework.ExpectNoError(err)
170170

171171
e := &policy.Eviction{
172172
ObjectMeta: metav1.ObjectMeta{
@@ -205,7 +205,7 @@ var _ = SIGDescribe("DisruptionController", func() {
205205

206206
ginkgo.By("First trying to evict a pod which shouldn't be evictable")
207207
pod, err := locateRunningPod(cs, ns)
208-
gomega.Expect(err).NotTo(gomega.HaveOccurred())
208+
framework.ExpectNoError(err)
209209

210210
waitForPodsOrDie(cs, ns, 3) // make sure that they are running and so would be evictable with a different pdb
211211
e := &policy.Eviction{
@@ -223,7 +223,7 @@ var _ = SIGDescribe("DisruptionController", func() {
223223
ginkgo.By("Trying to evict the same pod we tried earlier which should now be evictable")
224224
waitForPodsOrDie(cs, ns, 3)
225225
err = cs.CoreV1().Pods(ns).Evict(e)
226-
gomega.Expect(err).NotTo(gomega.HaveOccurred()) // the eviction is now allowed
226+
framework.ExpectNoError(err) // the eviction is now allowed
227227
})
228228
})
229229

0 commit comments

Comments
 (0)