Merge pull request #5331 from danfengliu/add-opt-in-opt-out-pv-to-e2e-test

Add backup opt-in/opt-out E2E test
This commit is contained in:
danfengliu
2022-09-26 21:43:59 +08:00
committed by GitHub
17 changed files with 523 additions and 21 deletions

View File

@@ -36,6 +36,7 @@ import (
"github.com/vmware-tanzu/velero/pkg/builder"
veleroexec "github.com/vmware-tanzu/velero/pkg/util/exec"
. "github.com/vmware-tanzu/velero/test/e2e"
. "github.com/vmware-tanzu/velero/test/e2e/util/common"
. "github.com/vmware-tanzu/velero/test/e2e/util/k8s"
. "github.com/vmware-tanzu/velero/test/e2e/util/velero"
)
@@ -466,14 +467,8 @@ func runEnableAPIGroupVersionsTests(ctx context.Context, client TestClient, reso
func installCRD(ctx context.Context, yaml string) error {
fmt.Printf("Install CRD with %s.\n", yaml)
cmd := exec.CommandContext(ctx, "kubectl", "apply", "-f", yaml)
_, stderr, err := veleroexec.RunCommand(cmd)
if err != nil {
return errors.Wrap(err, stderr)
}
return nil
err := KubectlApplyFile(ctx, yaml)
return err
}
func deleteCRD(ctx context.Context, yaml string) error {