mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-08 14:21:18 +00:00
Restore from PodVolumeBackups (#1723)
* Restore from PodVolumeBackups Signed-off-by: Carlisia <carlisiac@vmware.com> * Partially address code reviews Signed-off-by: Carlisia <carlisiac@vmware.com> * Partially address code reviews #2 Signed-off-by: Carlisia <carlisiac@vmware.com> * Clean up struct Signed-off-by: Carlisia <carlisiac@vmware.com> * Fix log messages Signed-off-by: Carlisia <carlisiac@vmware.com> * Fix tests Signed-off-by: Carlisia <carlisiac@vmware.com> * Clean up Signed-off-by: Carlisia <carlisiac@vmware.com> * Add changelog Signed-off-by: Carlisia <carlisiac@vmware.com>
This commit is contained in:
committed by
Adnan Abdulhussein
parent
4e1b1f9457
commit
4accb8512a
@@ -19,7 +19,6 @@ package controller
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -608,7 +607,7 @@ func TestProcessQueueItem(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
velerotest.ValidatePatch(t, actions[1], expected, decode)
|
||||
velerotest.ValidatePatch(t, actions[2], expected, decode)
|
||||
|
||||
// explicitly capturing the argument passed to Restore myself because
|
||||
// I want to validate the called arg as of the time of calling, but
|
||||
@@ -822,18 +821,14 @@ type fakeRestorer struct {
|
||||
}
|
||||
|
||||
func (r *fakeRestorer) Restore(
|
||||
log logrus.FieldLogger,
|
||||
restore *api.Restore,
|
||||
backup *api.Backup,
|
||||
volumeSnapshots []*volume.Snapshot,
|
||||
backupReader io.Reader,
|
||||
info pkgrestore.Request,
|
||||
actions []velero.RestoreItemAction,
|
||||
snapshotLocationLister listers.VolumeSnapshotLocationLister,
|
||||
volumeSnapshotterGetter pkgrestore.VolumeSnapshotterGetter,
|
||||
) (pkgrestore.Result, pkgrestore.Result) {
|
||||
res := r.Called(log, restore, backup, backupReader, actions)
|
||||
res := r.Called(info.Log, info.Restore, info.Backup, info.BackupReader, actions)
|
||||
|
||||
r.calledWithArg = *restore
|
||||
r.calledWithArg = *info.Restore
|
||||
|
||||
return res.Get(0).(pkgrestore.Result), res.Get(1).(pkgrestore.Result)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user