Add snapshot checkpoint for CSI E2E test and fix CSI snapshot name issue

1. Add checkpoint in snapshot E2E test to verify snapshot CR should be created and snapshot should be created in cloud side after backup completion;
2. Fix snapshot name issue that CSI snapshot name in cloud side is not the same with other non-CSI cloud snapshots;

Signed-off-by: danfengl <danfengl@vmware.com>
This commit is contained in:
danfengl
2022-04-10 10:20:16 +00:00
parent 001229a8b3
commit 33bf59a910
17 changed files with 474 additions and 90 deletions

View File

@@ -99,7 +99,7 @@ func GetPvcByPodName(ctx context.Context, namespace, podName string) ([]string,
return common.GetListBy2Pipes(ctx, *CmdLine1, *CmdLine2, *CmdLine3)
}
func GetPvByPvc(ctx context.Context, pvc string) ([]string, error) {
func GetPvByPvc(ctx context.Context, namespace, pvc string) ([]string, error) {
// Example:
// NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
// pvc-3f784366-58db-40b2-8fec-77307807e74b 1Gi RWO Delete Bound bsl-deletion/kibishii-data-kibishii-deployment-0 kibishii-storage-class 6h41m
@@ -110,7 +110,7 @@ func GetPvByPvc(ctx context.Context, pvc string) ([]string, error) {
CmdLine2 := &common.OsCommandLine{
Cmd: "grep",
Args: []string{pvc},
Args: []string{namespace + "/" + pvc},
}
CmdLine3 := &common.OsCommandLine{