Add CSI plugin in E2E test

Signed-off-by: danfengl <danfengl@vmware.com>
This commit is contained in:
danfengl
2022-03-28 08:49:07 +00:00
parent 3b75ae8ccc
commit 2c5c9246e6
11 changed files with 76 additions and 30 deletions

View File

@@ -136,3 +136,8 @@ func AddLabelToPod(ctx context.Context, podName, namespace, label string) error
fmt.Println(args)
return exec.CommandContext(ctx, "kubectl", args...).Run()
}
func KubectlApplyByFile(ctx context.Context, file string) error {
args := []string{"apply", "-f", file, "--force=true"}
return exec.CommandContext(ctx, "kubectl", args...).Run()
}