mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-19 22:44:21 +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:
@@ -149,11 +149,14 @@ func (p *PVCSelectedNodeChanging) Verify() error {
|
||||
}
|
||||
|
||||
func (p *PVCSelectedNodeChanging) Clean() error {
|
||||
if !p.VeleroCfg.Debug {
|
||||
if CurrentSpecReport().Failed() && p.VeleroCfg.FailFast {
|
||||
fmt.Println("Test case failed and fail fast is enabled. Skip resource clean up.")
|
||||
} else {
|
||||
p.TestCase.Clean()
|
||||
By(fmt.Sprintf("Clean namespace with prefix %s after test", p.mappedNS), func() {
|
||||
CleanupNamespaces(p.Ctx, p.Client, p.mappedNS)
|
||||
})
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user