mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-20 15:04:17 +00:00
Skip uninstall and resource cleanup when fail-fast is enabled.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
@@ -182,7 +182,9 @@ func (t *TestCase) Start() error {
|
||||
|
||||
func (t *TestCase) Clean() error {
|
||||
veleroCfg := t.GetTestCase().VeleroCfg
|
||||
if !veleroCfg.Debug {
|
||||
if CurrentSpecReport().Failed() && veleroCfg.FailFast {
|
||||
fmt.Println("Test case failed and fail fast is enabled. Skip resource clean up.")
|
||||
} else {
|
||||
By(fmt.Sprintf("Clean namespace with prefix %s after test", t.CaseBaseName), func() {
|
||||
if err := CleanupNamespaces(t.Ctx, t.Client, t.CaseBaseName); err != nil {
|
||||
fmt.Println("Fail to cleanup namespaces: ", err)
|
||||
@@ -195,6 +197,7 @@ func (t *TestCase) Clean() error {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user