Fix #6118: Do not persist VolumeSnapshot and VolumeSnapshotContent for snapshot DataMover case. (#6366)

1. Because VolumeSnapshot and VolumeSnapshotContent CRs are not kept after backup completed,
   don't persist them in the backup metadata.
2. Add some builder methods needed by CSI plugin.

Signed-off-by: Xun Jiang <jxun@vmware.com>
This commit is contained in:
Xun Jiang/Bruce Jiang
2023-06-08 17:05:17 +08:00
committed by GitHub
parent d7181fba55
commit 9743a7ce56
7 changed files with 237 additions and 6 deletions

View File

@@ -460,7 +460,15 @@ func TestRestorePodVolumes(t *testing.T) {
assert.Equal(t, test.errs[i].err, errMsg)
} else {
assert.EqualError(t, errs[i], test.errs[i].err)
for i := 0; i < len(errs); i++ {
j := 0
for ; j < len(test.errs); j++ {
if errs[i].Error() == test.errs[j].err {
break
}
}
assert.Equal(t, true, j < len(test.errs))
}
}
}
}