Skip to content

Commit

Permalink
fix: step cleanup not capturing current step (#401)
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
  • Loading branch information
eddycharly committed Nov 8, 2022
1 parent dd99d46 commit 8a65c1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/test/case.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,11 @@ func (t *Case) Run(test *testing.T, tc *report.Testcase) {
tc.Assertions += len(testStep.Errors)

if !t.SkipDelete {
defer func() {
if err := testStep.Clean(ns.Name); err != nil {
defer func(step *Step) {
if err := step.Clean(ns.Name); err != nil {
test.Error(err)
}
}()
}(testStep)
}

if errs := testStep.Run(ns.Name); len(errs) > 0 {
Expand Down

0 comments on commit 8a65c1c

Please sign in to comment.