Skip to content

Commit

Permalink
Merge pull request #252 from atc0005/fix-serviceoutput-test
Browse files Browse the repository at this point in the history
Fix `TestEmptyServiceOutputProducesNoOutput` test
  • Loading branch information
atc0005 authored Oct 9, 2024
2 parents 82bab11 + b067293 commit b640574
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions unexported_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,18 +152,15 @@ func TestEmptyServiceOutputProducesNoOutput(t *testing.T) {
// Explicitly indicate that the field is empty (default/zero value).
plugin.ServiceOutput = ""

// At this point the collected performance data collection is empty, the
// field used to hold the entries is nil. An attempt to process the empty
// collection should result in no output.
plugin.handlePerformanceData(&outputBuffer)
plugin.handleServiceOutputSection(&outputBuffer)

want := ""
got := outputBuffer.String()

if want != got {
t.Errorf("\nwant %q\ngot %q", want, got)
} else {
t.Logf("OK: Empty performance data collection produces no output.")
t.Logf("OK: Empty service output field produces no output.")
}

}
Expand Down

0 comments on commit b640574

Please sign in to comment.