Skip to content

Commit

Permalink
add better error reporting in tailer_test.go
Browse files Browse the repository at this point in the history
One of the github actions jobs was failing but I wasn't outputting the error
  • Loading branch information
jdrews committed May 1, 2023
1 parent a60d110 commit 4e4d8d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tailer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ func writeALine(t *testing.T, logFilePath string, logString string) {
datawriter := bufio.NewWriter(file)
_, err = datawriter.WriteString(fmt.Sprint(logString))
if err != nil {
t.Errorf("Unable to write a string to %s", logFilePath)
t.Errorf("Unable to write a string to %s, err: %s", logFilePath, err)
}
err = datawriter.Flush()
if err != nil {
t.Errorf("Unable to flush %s", logFilePath)
t.Errorf("Unable to flush %s, err: %s", logFilePath, err)
}
err = file.Close()
if err != nil {
t.Errorf("Unable to close %s", logFilePath)
t.Errorf("Unable to close %s, err: %s", logFilePath, err)
}
}

Expand Down

0 comments on commit 4e4d8d1

Please sign in to comment.