Skip to content

Commit

Permalink
Merge pull request vmware-tanzu#7592 from mmorel-35/gosimple
Browse files Browse the repository at this point in the history
golangci-lint(gosimple): fix test files
  • Loading branch information
blackpiglet authored May 27, 2024
2 parents 18921fc + 75fe761 commit c8e252c
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 10 deletions.
1 change: 0 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ issues:
- errcheck
- goconst
- gosec
- gosimple
- nilerr
- staticcheck
- stylecheck
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/basic/backup-volume-info/csi_data_mover.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (c *CSIDataMoverVolumeInfo) Verify() error {
BackupObjectsPrefix+"/"+c.BackupName,
)

Expect(err).ShouldNot(HaveOccurred(), fmt.Sprintf("Fail to get VolumeInfo metadata in the Backup Repository."))
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))
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/basic/backup-volume-info/csi_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (c *CSISnapshotVolumeInfo) Verify() error {
BackupObjectsPrefix+"/"+c.BackupName,
)

Expect(err).ShouldNot(HaveOccurred(), fmt.Sprintf("Fail to get VolumeInfo metadata in the Backup Repository."))
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))
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/basic/backup-volume-info/filesystem_upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (f *FilesystemUploadVolumeInfo) Verify() error {
BackupObjectsPrefix+"/"+f.BackupName,
)

Expect(err).ShouldNot(HaveOccurred(), fmt.Sprintf("Fail to get VolumeInfo metadata in the Backup Repository."))
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))
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/basic/backup-volume-info/skipped_volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ func (s *SkippedVolumeInfo) Verify() error {
BackupObjectsPrefix+"/"+s.BackupName,
)

Expect(err).ShouldNot(HaveOccurred(), fmt.Sprintf("Fail to get VolumeInfo metadata in the Backup Repository."))
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[0].Skipped == true).To(BeIdenticalTo(true))
Expect(volumeInfo[0].Skipped).To(BeIdenticalTo(true))

// Clean SC and VSC
return s.cleanResource()
Expand Down
3 changes: 1 addition & 2 deletions test/perf/backup/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package backup

import (
"context"
"fmt"
"strings"
"time"

Expand Down Expand Up @@ -48,7 +47,7 @@ func (b *BackupTest) Init() error {
b.TestMsg = &TestMSG{
Desc: "Do backup resources for performance test",
FailedMSG: "Failed to backup resources",
Text: fmt.Sprintf("Should backup resources success"),
Text: "Should backup resources success",
}
return nil
}
3 changes: 1 addition & 2 deletions test/perf/restore/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package restore

import (
"context"
"fmt"
"time"

"github.com/pkg/errors"
Expand All @@ -42,7 +41,7 @@ func (r *RestoreTest) Init() error {
r.TestMsg = &TestMSG{
Desc: "Do restore resources for performance test",
FailedMSG: "Failed to restore resources",
Text: fmt.Sprintf("Should restore resources success"),
Text: "Should restore resources success",
}
return nil
}
Expand Down

0 comments on commit c8e252c

Please sign in to comment.