Enable staticcheck and resolve found issues.

Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
This commit is contained in:
Xun Jiang
2023-04-25 11:27:27 +08:00
parent 1fd28e8a36
commit cb0ada1e1c
24 changed files with 51 additions and 45 deletions

View File

@@ -412,7 +412,7 @@ func TestGetBackupVolumeSnapshots(t *testing.T) {
// volumesnapshots file containing invalid data should error
harness.objectStore.PutObject(harness.bucket, "backups/test-backup/test-backup-volumesnapshots.json.gz", newStringReadSeeker("foo"))
res, err = harness.GetBackupVolumeSnapshots("test-backup")
_, err = harness.GetBackupVolumeSnapshots("test-backup")
assert.NotNil(t, err)
// volumesnapshots file containing gzipped json data should return correctly
@@ -454,7 +454,7 @@ func TestGetBackupItemOperations(t *testing.T) {
// itemoperations file containing invalid data should error
harness.objectStore.PutObject(harness.bucket, "backups/test-backup/test-backup-itemoperations.json.gz", newStringReadSeeker("foo"))
res, err = harness.GetBackupItemOperations("test-backup")
_, err = harness.GetBackupItemOperations("test-backup")
assert.NotNil(t, err)
// itemoperations file containing gzipped json data should return correctly