E2E supports VKS data mover environment.

* Add new flag HAS_VSPHERE_PLUGIN for E2E test.
* Modify the E2E README for the new parameter.
* Add the VolumeSnapshotClass for VKS.
* Modify the plugin install logic.
* Modify the cases to support data mover case in VKS.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
Xun Jiang
2024-12-19 13:52:57 +08:00
parent 3a627f0c81
commit cd61732f04
12 changed files with 117 additions and 37 deletions
+3 -2
View File
@@ -34,7 +34,7 @@ import (
. "github.com/vmware-tanzu/velero/test/util/velero"
)
// Test backup and restore of Kibishi using restic
// Test backup and restore of Kibishii using restic
func BackupDeletionWithSnapshots() {
backup_deletion_test(true)
@@ -143,7 +143,8 @@ func runBackupDeletionTests(client TestClient, veleroCfg VeleroConfig, backupLoc
})
})
for _, ns := range workloadNamespaceList {
if providerName == Vsphere && useVolumeSnapshots {
if useVolumeSnapshots &&
veleroCfg.HasVspherePlugin {
// Wait for uploads started by the Velero Plugin for vSphere to complete
// TODO - remove after upload progress monitoring is implemented
fmt.Println("Waiting for vSphere uploads to complete")
+21 -7
View File
@@ -122,19 +122,33 @@ func TTLTest() {
var snapshotCheckPoint SnapshotCheckPoint
if useVolumeSnapshots {
if veleroCfg.CloudProvider == Vsphere {
// TODO - remove after upload progress monitoring is implemented
if veleroCfg.HasVspherePlugin {
By("Waiting for vSphere uploads to complete", func() {
Expect(WaitForVSphereUploadCompletion(ctx, time.Hour,
test.testNS, 2)).To(Succeed())
})
}
snapshotCheckPoint, err = GetSnapshotCheckPoint(client, veleroCfg, 2, test.testNS, test.backupName, KibishiiPVCNameList)
Expect(err).NotTo(HaveOccurred(), "Fail to get Azure CSI snapshot checkpoint")
Expect(SnapshotsShouldBeCreatedInCloud(veleroCfg.CloudProvider,
veleroCfg.CloudCredentialsFile, veleroCfg.BSLBucket, veleroCfg.BSLConfig,
test.backupName, snapshotCheckPoint)).NotTo(HaveOccurred(), "Fail to get Azure CSI snapshot checkpoint")
snapshotCheckPoint, err = GetSnapshotCheckPoint(
client,
veleroCfg,
2,
test.testNS,
test.backupName,
KibishiiPVCNameList,
)
Expect(err).NotTo(HaveOccurred(), "Fail to get snapshot checkpoint")
Expect(
SnapshotsShouldBeCreatedInCloud(
veleroCfg.CloudProvider,
veleroCfg.CloudCredentialsFile,
veleroCfg.BSLBucket,
veleroCfg.BSLConfig,
test.backupName,
snapshotCheckPoint,
),
).NotTo(HaveOccurred(), "Fail to verify the created snapshots")
}
By(fmt.Sprintf("Simulating a disaster by removing namespace %s\n", BackupCfg.BackupName), func() {