mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-10-01 12:15:36 +00:00
Refactor Snapshot Checkpoint in E2E Tests (#9083)
Run the E2E test on kind / build (push) Failing after 8m19s
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 35s
Close stale issues and PRs / stale (push) Successful in 21s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m54s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 1m25s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 1m33s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 1m26s
Run the E2E test on kind / build (push) Failing after 8m19s
Run the E2E test on kind / setup-test-matrix (push) Successful in 4s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 35s
Close stale issues and PRs / stale (push) Successful in 21s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 1m54s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 1m25s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 1m33s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 1m26s
* Refactor backup volume info retrieval and snapshot checkpoint building in e2e tests Signed-off-by: Priyansh Choudhary <im1706@gmail.com> log backup volume info retrieval and snapshot checkpoint building Signed-off-by: Priyansh Choudhary <im1706@gmail.com> Add error handling for volume info retrieval in backup tests Signed-off-by: Priyansh Choudhary <im1706@gmail.com> Add error handling for volume info retrieval in backup tests Signed-off-by: Priyansh Choudhary <im1706@gmail.com> * Update snapshot checkpoint building to use DefaultKibishiiWorkerCounts Signed-off-by: Priyansh Choudhary <im1706@gmail.com> --------- Signed-off-by: Priyansh Choudhary <im1706@gmail.com>
This commit is contained in:
@@ -35,6 +35,8 @@ import (
|
||||
veleroutil "github.com/vmware-tanzu/velero/test/util/velero"
|
||||
)
|
||||
|
||||
const BackupObjectsPrefix = "backups"
|
||||
|
||||
type migrationE2E struct {
|
||||
framework.TestCase
|
||||
useVolumeSnapshots bool
|
||||
@@ -263,6 +265,8 @@ func (m *migrationE2E) Backup() error {
|
||||
snapshotCheckPoint.NamespaceBackedUp = m.CaseBaseName
|
||||
|
||||
if OriginVeleroCfg.SnapshotMoveData {
|
||||
// todo: Remove this as VSC are not preserved post backup. It's 0 by default.
|
||||
|
||||
//VolumeSnapshotContent should be deleted after data movement
|
||||
_, err := util.CheckVolumeSnapshotCR(
|
||||
*m.VeleroCfg.DefaultClient,
|
||||
@@ -284,16 +288,27 @@ func (m *migrationE2E) Backup() error {
|
||||
}
|
||||
|
||||
By("Snapshot should be created in cloud object store with retain policy", func() {
|
||||
snapshotCheckPoint, err = veleroutil.GetSnapshotCheckPoint(
|
||||
*OriginVeleroCfg.DefaultClient,
|
||||
backupVolumeInfo, err := providers.GetVolumeInfo(
|
||||
OriginVeleroCfg.ObjectStoreProvider,
|
||||
OriginVeleroCfg.CloudCredentialsFile,
|
||||
OriginVeleroCfg.BSLBucket,
|
||||
OriginVeleroCfg.BSLPrefix,
|
||||
OriginVeleroCfg.BSLConfig,
|
||||
m.BackupName,
|
||||
BackupObjectsPrefix+"/"+m.BackupName,
|
||||
)
|
||||
Expect(err).NotTo(HaveOccurred(), "Failed to get volume info for backup")
|
||||
|
||||
snapshotCheckPoint, err := veleroutil.BuildSnapshotCheckPointFromVolumeInfo(
|
||||
OriginVeleroCfg,
|
||||
backupVolumeInfo,
|
||||
m.kibishiiData.ExpectedNodes,
|
||||
m.CaseBaseName,
|
||||
m.BackupName,
|
||||
kibishii.GetKibishiiPVCNameList(m.kibishiiData.ExpectedNodes),
|
||||
)
|
||||
|
||||
Expect(err).NotTo(HaveOccurred(), "Fail to get snapshot checkpoint")
|
||||
|
||||
Expect(providers.CheckSnapshotsInProvider(
|
||||
OriginVeleroCfg,
|
||||
m.BackupName,
|
||||
|
||||
Reference in New Issue
Block a user