lint(ginkgolinter): expect (not)to HaveOccurred (#7565)

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2024-03-29 15:05:48 +01:00
committed by GitHub
parent 67bd694d1b
commit 3d6dab0708
18 changed files with 50 additions and 53 deletions

View File

@@ -55,7 +55,7 @@ var _ = Describe("Server Status Request Reconciler", func() {
// `now` will be used to set the fake clock's time; capture
// it here so it can be referenced in the test case defs.
now, err := time.Parse(time.RFC1123, time.RFC1123)
Expect(err).To(BeNil())
Expect(err).ToNot(HaveOccurred())
now = now.Local()
DescribeTable("a Server Status request",
@@ -79,7 +79,7 @@ var _ = Describe("Server Status Request Reconciler", func() {
Expect(actualResult).To(BeEquivalentTo(test.expectedRequeue))
if test.expectedErrMsg == "" {
Expect(err).To(BeNil())
Expect(err).ToNot(HaveOccurred())
} else {
Expect(err.Error()).To(BeEquivalentTo(test.expectedErrMsg))
return
@@ -92,7 +92,7 @@ var _ = Describe("Server Status Request Reconciler", func() {
if test.expected == nil {
Expect(apierrors.IsNotFound(err)).To(BeTrue())
} else {
Expect(err).To(BeNil())
Expect(err).ToNot(HaveOccurred())
Eventually(instance.Status.Phase == test.expected.Status.Phase, timeout).Should(BeTrue())
}
},