Signed-off-by: Anshul Ahuja <anshul.ahu@gmail.com>
This commit is contained in:
Anshul Ahuja
2024-09-02 05:08:59 +00:00
parent 79156bedad
commit 434bd2f3ae
2 changed files with 2 additions and 2 deletions

View File

@@ -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
}

View File

@@ -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{