Skip to content

Commit

Permalink
Incorporated feedback to fix unit tests failure and check for err dur…
Browse files Browse the repository at this point in the history
…ing f.close
  • Loading branch information
rnapoles-rh committed Mar 2, 2022
1 parent 95af809 commit 1328b35
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/helper/helper_generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,14 @@ func CommonAfterEach(commonVar CommonVar) {
if err != nil {
fmt.Println("Error: ", err)
} else {
defer f.Close()
if _, err = f.WriteString(resultsRow); err != nil {
f.Close()
_, err = f.WriteString(resultsRow)
if err != nil {
fmt.Println("Error: ", err)
}
if err = f.Close(); err != nil {
fmt.Println("Error: ", err)
}
f.Close()
}

// delete the random project/namespace created in CommonBeforeEach
Expand Down

0 comments on commit 1328b35

Please sign in to comment.