Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use framework.ExpectNoError in e2e apps disruption #77894

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/e2e/apps/disruption.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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{
Expand All @@ -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
})
})

Expand Down