mirror of
https://github.com/vmware-tanzu/velero.git
synced 2025-12-23 06:15:21 +00:00
Add nolint directives for intentional deprecated function usage
The ShouldPerformSnapshotWithVolumeHelper function and tests intentionally use NewVolumeHelperImpl (deprecated) for backwards compatibility with third-party plugins. Add nolint:staticcheck to suppress the linter warnings with explanatory comments. Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
This commit is contained in:
@@ -322,6 +322,7 @@ func TestVolumeHelperImpl_ShouldPerformSnapshot(t *testing.T) {
|
|||||||
t.Fatalf("failed to build policy with error %v", err)
|
t.Fatalf("failed to build policy with error %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//nolint:staticcheck // Testing deprecated function for backwards compatibility
|
||||||
vh := NewVolumeHelperImpl(
|
vh := NewVolumeHelperImpl(
|
||||||
p,
|
p,
|
||||||
tc.snapshotVolumesFlag,
|
tc.snapshotVolumesFlag,
|
||||||
@@ -687,6 +688,7 @@ func TestVolumeHelperImpl_ShouldPerformFSBackup(t *testing.T) {
|
|||||||
t.Fatalf("failed to build policy with error %v", err)
|
t.Fatalf("failed to build policy with error %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//nolint:staticcheck // Testing deprecated function for backwards compatibility
|
||||||
vh := NewVolumeHelperImpl(
|
vh := NewVolumeHelperImpl(
|
||||||
p,
|
p,
|
||||||
tc.snapshotVolumesFlag,
|
tc.snapshotVolumesFlag,
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ func ShouldPerformSnapshotWithVolumeHelper(
|
|||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//nolint:staticcheck // Intentional use of deprecated function for backwards compatibility
|
||||||
volumeHelperImpl := volumehelper.NewVolumeHelperImpl(
|
volumeHelperImpl := volumehelper.NewVolumeHelperImpl(
|
||||||
resourcePolicies,
|
resourcePolicies,
|
||||||
backup.Spec.SnapshotVolumes,
|
backup.Spec.SnapshotVolumes,
|
||||||
|
|||||||
Reference in New Issue
Block a user