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

@@ -100,12 +100,12 @@ var _ = Describe("Backup Storage Location Reconciler", func() {
NamespacedName: types.NamespacedName{Namespace: location.Namespace, Name: location.Name},
})
Expect(actualResult).To(BeEquivalentTo(ctrl.Result{}))
Expect(err).To(BeNil())
Expect(err).ToNot(HaveOccurred())
key := client.ObjectKey{Name: location.Name, Namespace: location.Namespace}
instance := &velerov1api.BackupStorageLocation{}
err = r.client.Get(ctx, key, instance)
Expect(err).To(BeNil())
Expect(err).ToNot(HaveOccurred())
Expect(instance.Spec.Default).To(BeIdenticalTo(tests[i].expectedIsDefault))
Expect(instance.Status.Phase).To(BeIdenticalTo(tests[i].expectedPhase))
}
@@ -165,12 +165,12 @@ var _ = Describe("Backup Storage Location Reconciler", func() {
NamespacedName: types.NamespacedName{Namespace: location.Namespace, Name: location.Name},
})
Expect(actualResult).To(BeEquivalentTo(ctrl.Result{}))
Expect(err).To(BeNil())
Expect(err).ToNot(HaveOccurred())
key := client.ObjectKey{Name: location.Name, Namespace: location.Namespace}
instance := &velerov1api.BackupStorageLocation{}
err = r.client.Get(ctx, key, instance)
Expect(err).To(BeNil())
Expect(err).ToNot(HaveOccurred())
Expect(instance.Spec.Default).To(BeIdenticalTo(tests[i].expectedIsDefault))
}
})