mirror of https://github.com/sirupsen/logrus.git
testutils: fix testify usage (report by testifylint)
Use require.NoError(t, err) instead of require.Nil(t, err).
This commit is contained in:
parent
dd1b4c2e81
commit
294b497c0f
|
@ -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)) {
|
||||
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue