Skip to content

Commit

Permalink
Merge pull request #191 from blackpiglet/resolve_conflict
Browse files Browse the repository at this point in the history
Resolve conflict with PR #180
  • Loading branch information
blackpiglet authored Jul 21, 2023
2 parents 77ee0b4 + 6a5a13e commit 18ce893
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ site/vendor

.vs

_tiltbuild
_tiltbuild
coverage.out
2 changes: 1 addition & 1 deletion internal/restore/pvc_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (p *PVCRestoreItemAction) Execute(input *velero.RestoreItemActionExecuteInp
}
logger.Infof("DataDownload %s/%s is created successfully.", dataDownload.Namespace, dataDownload.Name)
} else {
volumeSnapshotName, ok := pvc.Annotations[util.VolumeSnapshotLabel]
volumeSnapshotName, ok := pvcFromBackup.Annotations[util.VolumeSnapshotLabel]
if !ok {
logger.Info("Skipping PVCRestoreItemAction for PVC , PVC does not have a CSI volumesnapshot.")
// Make no change in the input PVC.
Expand Down
2 changes: 1 addition & 1 deletion internal/restore/pvc_action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ func TestExecute(t *testing.T) {
DataSourceRef(&corev1api.TypedLocalObjectReference{APIGroup: &snapshotv1api.SchemeGroupVersion.Group, Kind: util.VolumeSnapshotKindName, Name: "testVS"}).
Result(),
vs: builder.ForVolumeSnapshot("velero", "testVS").ObjectMeta(builder.WithAnnotations(util.VolumeSnapshotRestoreSize, "10Gi")).Result(),
expectedPVC: builder.ForPersistentVolumeClaim("velero", "testPVC").ObjectMeta(builder.WithAnnotations("velero.io/volume-snapshot-name", "testVS")).Result(),
expectedPVC: builder.ForPersistentVolumeClaim("velero", "testPVC").Result(),
},
{
name: "Restore from VolumeSnapshot without volume-snapshot-name annotation",
Expand Down

0 comments on commit 18ce893

Please sign in to comment.