Skip to content

Commit

Permalink
fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
DStrand1 committed Jun 10, 2024
1 parent e493c8c commit f030354
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions plugins/parsers/json/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,7 @@ func FuzzParserJSON(f *testing.F) {
require.NoError(f, parser.Init())

f.Fuzz(func(t *testing.T, input []byte) {
_, err := parser.Parse(input)
require.NoError(t, err)
//nolint:errcheck // fuzz testing can give lots of errors, but we just want to test for crashes
parser.Parse(input)
})
}
8 changes: 4 additions & 4 deletions plugins/parsers/xpath/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1345,11 +1345,11 @@ func TestTestCases(t *testing.T) {
require.NoError(t, err)

// Get the expectations
expectedOutputs, err := testutil.ParseMetricsFrom(header, "Expected Output:", parser)
require.NoError(t, err)
//nolint:errcheck // these may not be set by the testcase, in which case it would error correctly
expectedOutputs, _ := testutil.ParseMetricsFrom(header, "Expected Output:", parser)

expectedErrors, err := testutil.ParseRawLinesFrom(header, "Expected Error:")
require.NoError(t, err)
//nolint:errcheck // these may not be set by the testcase, in which case it would error correctly
expectedErrors, _ := testutil.ParseRawLinesFrom(header, "Expected Error:")

// Setup the parser and run it.
metricName := "xml"
Expand Down

0 comments on commit f030354

Please sign in to comment.