Skip uninstall and resource cleanup when fail-fast is enabled.

Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
Xun Jiang
2024-09-23 20:24:14 +08:00
parent 3f9c2dc789
commit 1ba78b83bf
26 changed files with 380 additions and 242 deletions
+1 -1
View File
@@ -161,7 +161,7 @@ func (t *TestCase) Verify() error {
}
func (t *TestCase) Clean() error {
if !VeleroCfg.Debug || VeleroCfg.DeleteClusterResource {
if (!CurrentSpecReport().Failed() || !VeleroCfg.FailFast) || VeleroCfg.DeleteClusterResource {
By("Clean backups and restore after test", func() {
if len(t.BackupArgs) != 0 {
if err := VeleroBackupDelete(t.Ctx, VeleroCfg.VeleroCLI, VeleroCfg.VeleroNamespace, t.BackupName); err != nil {