Skip to content

Commit 50be552

Browse files
committed
ingester tests: don't assert error Equals
Check it contains the string instead.
1 parent 93ba109 commit 50be552

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/ingester/ingester_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,10 +927,10 @@ func TestIngester_Push(t *testing.T) {
927927

928928
// We expect no error on any request except the last one
929929
// which may error (and in that case we assert on it)
930-
if idx < len(testData.reqs)-1 {
930+
if idx < len(testData.reqs)-1 || testData.expectedErr == nil {
931931
assert.NoError(t, err)
932932
} else {
933-
assert.Equal(t, testData.expectedErr, err)
933+
assert.ErrorContains(t, err, testData.expectedErr.Error())
934934
}
935935
}
936936

0 commit comments

Comments
 (0)