mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 04:55:22 +00:00
lint(ginkgolinter): expect (not)to HaveOccurred (#7565)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
@@ -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())
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user