mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 13:05:17 +00:00
Add backup opt-in/opt-out E2E test
Signed-off-by: danfengl <danfengl@vmware.com>
This commit is contained in:
@@ -164,10 +164,12 @@ func (t *TestCase) Destroy() error {
|
||||
}
|
||||
|
||||
func (t *TestCase) Restore() error {
|
||||
if err := VeleroCmdExec(t.Ctx, VeleroCfg.VeleroCLI, t.RestoreArgs); err != nil {
|
||||
RunDebug(context.Background(), VeleroCfg.VeleroCLI, VeleroCfg.VeleroNamespace, t.BackupName, "")
|
||||
return errors.Wrapf(err, "Failed to restore resources")
|
||||
}
|
||||
By("Start to restore ......", func() {
|
||||
Expect(VeleroCmdExec(t.Ctx, VeleroCfg.VeleroCLI, t.RestoreArgs)).To(Succeed(), func() string {
|
||||
RunDebug(context.Background(), VeleroCfg.VeleroCLI, VeleroCfg.VeleroNamespace, t.BackupName, "")
|
||||
return "Fail to restore workload"
|
||||
})
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user