mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-07 05:46:37 +00:00
golangci-lint: use exclude-rules instead of skip-files and skip-dirs
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
@@ -154,8 +154,8 @@ func TestBackupProgressIsUpdated(t *testing.T) {
|
||||
h.backupper.Backup(h.log, req, backupFile, nil, nil)
|
||||
|
||||
require.NotNil(t, req.Status.Progress)
|
||||
assert.Equal(t, len(req.BackedUpItems), req.Status.Progress.TotalItems)
|
||||
assert.Equal(t, len(req.BackedUpItems), req.Status.Progress.ItemsBackedUp)
|
||||
assert.Len(t, req.BackedUpItems, req.Status.Progress.TotalItems)
|
||||
assert.Len(t, req.BackedUpItems, req.Status.Progress.ItemsBackedUp)
|
||||
}
|
||||
|
||||
// TestBackupResourceFiltering runs backups with different combinations
|
||||
|
||||
@@ -76,5 +76,4 @@ func TestSortOrderedResource(t *testing.T) {
|
||||
}
|
||||
sortedPvResources := sortResourcesByOrder(log, pvResources, pvOrder)
|
||||
assert.Equal(t, sortedPvResources, expectedPvResources)
|
||||
|
||||
}
|
||||
|
||||
@@ -136,7 +136,6 @@ func TestRemapCRDVersionAction(t *testing.T) {
|
||||
// set it back to the default one
|
||||
a.discoveryHelper = fakeDiscoveryHelper()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// TestRemapCRDVersionActionData tests the RemapCRDVersionAction plugin against actual CRD to confirm that the v1beta1 version is returned when the v1 version is passed in to the plugin.
|
||||
@@ -217,7 +216,6 @@ func TestRemapCRDVersionActionData(t *testing.T) {
|
||||
betaClient.Delete(context.TODO(), crd.Name, metav1.DeleteOptions{})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func fakeDiscoveryHelper() velerodiscovery.Helper {
|
||||
|
||||
@@ -400,7 +400,6 @@ func TestServiceAccountActionExecute(t *testing.T) {
|
||||
assert.Equal(t, test.expectedAdditionalItems, additional)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestServiceAccountActionExecuteOnBeta1(t *testing.T) {
|
||||
@@ -608,5 +607,4 @@ func TestServiceAccountActionExecuteOnBeta1(t *testing.T) {
|
||||
assert.Equal(t, test.expectedAdditionalItems, additional)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user