From 83650b1142d7a4a073d13e63142da00b54b27db2 Mon Sep 17 00:00:00 2001 From: Rodolfo Napoles Date: Fri, 4 Mar 2022 19:10:14 -0600 Subject: [PATCH] Incorporated additional feedback on close command --- tests/helper/helper_generic.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/helper/helper_generic.go b/tests/helper/helper_generic.go index e17c34a1689..0791f572c53 100644 --- a/tests/helper/helper_generic.go +++ b/tests/helper/helper_generic.go @@ -341,15 +341,14 @@ func CommonAfterEach(commonVar CommonVar) { f, err := os.OpenFile(testResultsFile, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600) if err != nil { - fmt.Println("Error: ", err) + fmt.Println("Error when opening file: ", err) } else { - f.Close() _, err = f.WriteString(resultsRow) if err != nil { - fmt.Println("Error: ", err) + fmt.Println("Error when writing to file: ", err) } if err = f.Close(); err != nil { - fmt.Println("Error: ", err) + fmt.Println("Error when closing file: ", err) } }