Skip to content

Commit

Permalink
testutils: fix testify usage (report by testifylint)
Browse files Browse the repository at this point in the history
Use require.NoError(t, err) instead of require.Nil(t, err).
  • Loading branch information
dolmen committed Mar 11, 2024
1 parent dd1b4c2 commit 294b497
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/testutils/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"strings"
"testing"

. "github.com/sirupsen/logrus"

"github.com/stretchr/testify/require"

. "github.com/sirupsen/logrus"
)

func LogAndAssertJSON(t *testing.T, log func(*Logger), assertions func(fields Fields)) {
Expand All @@ -23,7 +23,7 @@ func LogAndAssertJSON(t *testing.T, log func(*Logger), assertions func(fields Fi
log(logger)

err := json.Unmarshal(buffer.Bytes(), &fields)
require.Nil(t, err)
require.NoError(t, err)

assertions(fields)
}
Expand Down

0 comments on commit 294b497

Please sign in to comment.