mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-05-01 12:55:46 +00:00
@@ -1953,7 +1953,7 @@ func hasCSIVolumeSnapshot(ctx *restoreContext, unstructuredPV *unstructured.Unst
|
||||
|
||||
for _, vs := range ctx.csiVolumeSnapshots {
|
||||
// In some error cases, the VSs' source PVC could be nil or PVs ClaimRef could be nil. Skip them.
|
||||
if vs.Spec.Source.PersistentVolumeClaimName == nil || pv.Spec.ClaimRef == nil {
|
||||
if vs.Spec.Source.PersistentVolumeClaimName == nil || pv.Spec.ClaimRef == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@@ -3989,7 +3989,7 @@ func TestHasCSIVolumeSnapshot(t *testing.T) {
|
||||
vs: builder.ForVolumeSnapshot("velero", "test").SourcePVC("test").Result(),
|
||||
expectedResult: false,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
name: "Find VS, expect true.",
|
||||
obj: &unstructured.Unstructured{
|
||||
|
||||
Reference in New Issue
Block a user