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 10:05:48 -04:00
committed by GitHub
parent 67bd694d1b
commit 3d6dab0708
18 changed files with 50 additions and 53 deletions
@@ -451,7 +451,7 @@ var _ = Describe("Backup Sync Reconciler", func() {
})
Expect(actualResult).To(BeEquivalentTo(ctrl.Result{}))
Expect(err).To(BeNil())
Expect(err).ToNot(HaveOccurred())
// process the cloud backups
for _, cloudBackupData := range test.cloudBackups {
@@ -467,7 +467,7 @@ var _ = Describe("Backup Sync Reconciler", func() {
cloudBackupData.backup.Status.Expiration.After(fakeClock.Now())) {
Expect(apierrors.IsNotFound(err)).To(BeTrue())
} else {
Expect(err).To(BeNil())
Expect(err).ToNot(HaveOccurred())
// did this cloud backup already exist in the cluster?
var existing *velerov1api.Backup
@@ -496,7 +496,7 @@ var _ = Describe("Backup Sync Reconciler", func() {
locationName = label.GetValidName(locationName)
}
Expect(locationName).To(BeEquivalentTo(obj.Labels[velerov1api.StorageLocationLabel]))
Expect(len(obj.Labels[velerov1api.StorageLocationLabel]) <= validation.DNS1035LabelMaxLength).To(BeTrue())
Expect(len(obj.Labels[velerov1api.StorageLocationLabel])).To(BeNumerically("<=", validation.DNS1035LabelMaxLength))
}
}