mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-12-03 14:53:52 +00:00
Use ExpectNoError(err)
We missed another pattern to check error doesn't happen on e2e tests. This covers the pattern for consistent test implementation.
This commit is contained in:
@@ -594,7 +594,7 @@ var _ = SIGDescribe("Kubectl client", func() {
|
||||
gomega.Expect(runOutput).ToNot(gomega.ContainSubstring("stdin closed"))
|
||||
g := func(pods []*v1.Pod) sort.Interface { return sort.Reverse(controller.ActivePods(pods)) }
|
||||
runTestPod, _, err := polymorphichelpers.GetFirstPod(f.ClientSet.CoreV1(), ns, "run=run-test-3", 1*time.Minute, g)
|
||||
gomega.Expect(err).To(gomega.BeNil())
|
||||
framework.ExpectNoError(err)
|
||||
if !e2epod.CheckPodsRunningReady(c, ns, []string{runTestPod.Name}, time.Minute) {
|
||||
framework.Failf("Pod %q of Job %q should still be running", runTestPod.Name, "run-test-3")
|
||||
}
|
||||
@@ -609,7 +609,7 @@ var _ = SIGDescribe("Kubectl client", func() {
|
||||
gomega.Expect(logOutput).ToNot(gomega.ContainSubstring("stdin closed"))
|
||||
return strings.Contains(logOutput, "abcd1234"), nil
|
||||
})
|
||||
gomega.Expect(err).To(gomega.BeNil())
|
||||
framework.ExpectNoError(err)
|
||||
|
||||
gomega.Expect(c.CoreV1().Pods(ns).Delete(context.TODO(), "run-test-3", metav1.DeleteOptions{})).To(gomega.BeNil())
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user