Bump golangci-lint from v1.57.2 to v1.64.5 (#8641)
Run the E2E test on kind / build (push) Failing after 5m43s
Run the E2E test on kind / setup-test-matrix (push) Successful in 2s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
build-image / Build (push) Failing after 8s
Main CI / Build (push) Failing after 33s

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2025-03-04 13:55:29 +05:30
committed by GitHub
parent 3c22de7fe3
commit 6a6a237ba7
27 changed files with 87 additions and 58 deletions
@@ -58,7 +58,7 @@ func (c *CSIDataMoverVolumeInfo) Verify() error {
Expect(err).ShouldNot(HaveOccurred(), "Fail to get VolumeInfo metadata in the Backup Repository.")
fmt.Printf("The VolumeInfo metadata content: %+v\n", *volumeInfo[0])
Expect(len(volumeInfo) > 0).To(BeIdenticalTo(true))
Expect(volumeInfo).ToNot(BeEmpty())
Expect(volumeInfo[0].SnapshotDataMovementInfo).NotTo(BeNil())
return nil
@@ -57,7 +57,7 @@ func (c *CSISnapshotVolumeInfo) Verify() error {
Expect(err).ShouldNot(HaveOccurred(), "Fail to get VolumeInfo metadata in the Backup Repository.")
fmt.Printf("The VolumeInfo metadata content: %+v\n", *volumeInfo[0])
Expect(len(volumeInfo) > 0).To(BeIdenticalTo(true))
Expect(volumeInfo).ToNot(BeEmpty())
Expect(volumeInfo[0].CSISnapshotInfo).NotTo(BeNil())
return nil
@@ -57,7 +57,7 @@ func (f *FilesystemUploadVolumeInfo) Verify() error {
Expect(err).ShouldNot(HaveOccurred(), "Fail to get VolumeInfo metadata in the Backup Repository.")
fmt.Printf("The VolumeInfo metadata content: %+v\n", *volumeInfo[0])
Expect(len(volumeInfo) > 0).To(BeIdenticalTo(true))
Expect(volumeInfo).ToNot(BeEmpty())
Expect(volumeInfo[0].PVBInfo).NotTo(BeNil())
return nil
@@ -58,7 +58,7 @@ func (n *NativeSnapshotVolumeInfo) Verify() error {
Expect(err).ShouldNot(HaveOccurred(), "Fail to get VolumeInfo metadata in the Backup Repository.")
fmt.Printf("The VolumeInfo metadata content: %+v\n", *volumeInfo[0])
Expect(len(volumeInfo) > 0).To(BeIdenticalTo(true))
Expect(volumeInfo).ToNot(BeEmpty())
Expect(volumeInfo[0].NativeSnapshotInfo).NotTo(BeNil())
return nil
@@ -57,7 +57,7 @@ func (s *SkippedVolumeInfo) Verify() error {
Expect(err).ShouldNot(HaveOccurred(), "Fail to get VolumeInfo metadata in the Backup Repository.")
fmt.Printf("The VolumeInfo metadata content: %+v\n", *volumeInfo[0])
Expect(len(volumeInfo) > 0).To(BeIdenticalTo(true))
Expect(volumeInfo).ToNot(BeEmpty())
Expect(volumeInfo[0].Skipped).To(BeIdenticalTo(true))
return nil
@@ -111,7 +111,7 @@ func (e *ExcludeResources) Verify() error {
}
return errors.Wrap(err, fmt.Sprintf("failed to list secrets in namespace: %q", namespace))
} else if len(secretsList.Items) != 0 {
return errors.Errorf(fmt.Sprintf("Should no secrets found %s in namespace: %q", secretsList.Items[0].Name, namespace))
return errors.Errorf("Should no secrets found %s in namespace: %q", secretsList.Items[0].Name, namespace)
}
//Check configmap
@@ -119,7 +119,7 @@ func (e *ExcludeResources) Verify() error {
if err != nil {
return errors.Wrap(err, fmt.Sprintf("failed to list configmap in namespace: %q", namespace))
} else if len(configmapList.Items) == 0 {
return errors.Errorf(fmt.Sprintf("Should have configmap found in namespace: %q", namespace))
return errors.Errorf("Should have configmap found in namespace: %q", namespace)
}
}
return nil
@@ -107,7 +107,7 @@ func (i *IncludeResources) Verify() error {
}
return errors.Wrap(err, fmt.Sprintf("failed to list secrets in namespace: %q", namespace))
} else if len(secretsList.Items) != 0 {
return errors.Errorf(fmt.Sprintf("Should no secrets found %s in namespace: %q", secretsList.Items[0].Name, namespace))
return errors.Errorf("Should no secrets found %s in namespace: %q", secretsList.Items[0].Name, namespace)
}
//Check configmap
@@ -115,7 +115,7 @@ func (i *IncludeResources) Verify() error {
if err != nil {
return errors.Wrap(err, fmt.Sprintf("failed to list configmap in namespace: %q", namespace))
} else if len(configmapList.Items) == 0 {
return errors.Errorf(fmt.Sprintf("Should have configmap found in namespace: %q", namespace))
return errors.Errorf("Should have configmap found in namespace: %q", namespace)
}
}
return nil
@@ -142,7 +142,7 @@ func (l *LabelSelector) Verify() error {
if err != nil {
return errors.Wrap(err, fmt.Sprintf("failed to list secrets in namespace: %q", namespace))
} else if len(secretsList.Items) == 0 {
return errors.Errorf(fmt.Sprintf("no secrets found in namespace: %q", namespace))
return errors.Errorf("no secrets found in namespace: %q", namespace)
}
} else { //exclude
if err == nil {
+1 -1
View File
@@ -77,7 +77,7 @@ func WaitForPods(ctx context.Context, client TestClient, namespace string, pods
return true, nil
})
if err != nil {
return errors.Wrapf(err, fmt.Sprintf("Failed to wait for pods in namespace %s to start running", namespace))
return errors.Wrapf(err, "Failed to wait for pods in namespace %s to start running", namespace)
}
return nil
}
+3 -3
View File
@@ -333,7 +333,7 @@ func generateData(ctx context.Context, namespace string, kibishiiData *KibishiiD
})
if err != nil {
return errors.Wrapf(err, fmt.Sprintf("Failed to wait generate data in namespace %s", namespace))
return errors.Wrapf(err, "Failed to wait generate data in namespace %s", namespace)
}
return nil
}
@@ -363,7 +363,7 @@ func verifyData(ctx context.Context, namespace string, kibishiiData *KibishiiDat
})
if err != nil {
return errors.Wrapf(err, fmt.Sprintf("Failed to verify kibishii data in namespace %s\n", namespace))
return errors.Wrapf(err, "Failed to verify kibishii data in namespace %s\n", namespace)
}
fmt.Printf("Success to verify kibishii data in namespace %s\n", namespace)
return nil
@@ -430,7 +430,7 @@ func KibishiiVerifyAfterRestore(client TestClient, kibishiiNamespace string, one
for _, pod := range KibishiiPodNameList {
exist, err := FileExistInPV(oneHourTimeout, kibishiiNamespace, pod, "kibishii", "data", incrementalFileName)
if err != nil {
return errors.Wrapf(err, fmt.Sprintf("fail to get file %s", incrementalFileName))
return errors.Wrapf(err, "fail to get file %s", incrementalFileName)
}
if exist {
+1 -1
View File
@@ -168,7 +168,7 @@ func getStorageAccountKey(credentialsFile, accountName, subscriptionID, resource
if err != nil {
return "", errors.WithStack(err)
}
if res.Keys == nil || len(res.Keys) == 0 {
if len(res.Keys) == 0 {
return "", errors.New("No storage keys found")
}
+3 -3
View File
@@ -97,7 +97,7 @@ func (s GCSStorage) DeleteObjectsInBucket(cloudCredentialsFile, bslBucket, bslPr
if strings.Contains(obj.Name, bslPrefix+backupObject+"/") {
fmt.Printf("Delete item: %s\n", obj.Name)
if err = bucket.Object(obj.Name).Delete(ctx); err != nil {
return errors.Wrapf(err, fmt.Sprintf("Fail to delete object %s in bucket %s", obj.Name, bslBucket))
return errors.Wrapf(err, "Fail to delete object %s in bucket %s", obj.Name, bslBucket)
}
}
}
@@ -107,12 +107,12 @@ func (s GCSStorage) IsSnapshotExisted(cloudCredentialsFile, bslConfig, backupObj
ctx := context.Background()
data, err := os.ReadFile(cloudCredentialsFile)
if err != nil {
return errors.Wrapf(err, fmt.Sprintf("Failed reading gcloud credential file %s", cloudCredentialsFile))
return errors.Wrapf(err, "Failed reading gcloud credential file %s", cloudCredentialsFile)
}
creds, err := google.CredentialsFromJSON(ctx, data)
if err != nil {
return errors.Wrapf(err, fmt.Sprintf("Failed getting credentials from JSON data %s", string(data)))
return errors.Wrapf(err, "Failed getting credentials from JSON data %s", string(data))
}
computeService, err := compute.NewService(context.Background(), option.WithCredentialsFile(cloudCredentialsFile))