Skip to content

Commit

Permalink
[chore] [receiver/mongodb] Fix test assertion (#33713)
Browse files Browse the repository at this point in the history
The expected and actual errors are misplaced. It makes the test output
confusing
  • Loading branch information
dmitryax authored Jun 21, 2024
1 parent 5bf038c commit 93a78c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion receiver/mongodbreceiver/scraper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func TestScraperScrape(t *testing.T) {
// The first error message would not have a leading whitespace and hence split on "; "
expectedErrs := strings.Split(tc.expectedErr.Error(), "; ")
sort.Strings(expectedErrs)
require.Equal(t, actualErrs, expectedErrs)
require.Equal(t, expectedErrs, actualErrs)
} else {
require.EqualError(t, err, tc.expectedErr.Error())
}
Expand Down

0 comments on commit 93a78c6

Please sign in to comment.