diff --git a/test/e2e/test/test.go b/test/e2e/test/test.go index 15bde3958..89a8fa71d 100644 --- a/test/e2e/test/test.go +++ b/test/e2e/test/test.go @@ -145,6 +145,15 @@ func (t *TestCase) Backup() error { RunDebug(context.Background(), veleroCfg.VeleroCLI, veleroCfg.VeleroNamespace, t.BackupName, "") return errors.Wrapf(err, "Failed to backup resources") } + + // the snapshots of AWS may be still in pending status when do the restore, wait for a while + // to avoid this https://github.com/vmware-tanzu/velero/issues/1799 + // TODO remove this after https://github.com/vmware-tanzu/velero/issues/3533 is fixed + if t.UseVolumeSnapshots { + fmt.Println("Waiting 5 minutes to make sure the snapshots are ready...") + time.Sleep(5 * time.Minute) + } + return nil } diff --git a/test/util/velero/velero_utils.go b/test/util/velero/velero_utils.go index 3976480e7..21f895fdd 100644 --- a/test/util/velero/velero_utils.go +++ b/test/util/velero/velero_utils.go @@ -706,7 +706,7 @@ func VeleroAddPluginsForProvider(ctx context.Context, veleroCLI string, veleroNa stdoutBuf := new(bytes.Buffer) stderrBuf := new(bytes.Buffer) - installPluginCmd := exec.CommandContext(ctx, veleroCLI, "--namespace", veleroNamespace, "plugin", "add", plugin) + installPluginCmd := exec.CommandContext(ctx, veleroCLI, "--namespace", veleroNamespace, "plugin", "add", plugin, "--confirm") fmt.Printf("installPluginCmd cmd =%v\n", installPluginCmd) installPluginCmd.Stdout = stdoutBuf installPluginCmd.Stderr = stderrBuf