Clean backups after each test and fix exlude label test issue

1. Clean backups after each test to avoid exceeding limitation of storage capability during E2E test;
2. Fix exlude label test issue that namespace should not be included and excluded at the same time no matter by which way to config.

Signed-off-by: danfengl <danfengl@vmware.com>
This commit is contained in:
danfengl
2022-08-15 07:35:30 +00:00
parent 775943c858
commit 6e8061266c
12 changed files with 194 additions and 105 deletions

View File

@@ -59,8 +59,11 @@ func BackupRestoreTest(useVolumeSnapshots bool) {
})
AfterEach(func() {
if VeleroCfg.InstallVelero {
if !VeleroCfg.Debug {
if !VeleroCfg.Debug {
By("Clean backups after test", func() {
DeleteBackups(context.Background(), *VeleroCfg.ClientToInstallVelero)
})
if VeleroCfg.InstallVelero {
err = VeleroUninstall(context.Background(), VeleroCfg.VeleroCLI, VeleroCfg.VeleroNamespace)
Expect(err).To(Succeed())
}