Skip to content

Commit

Permalink
Replace some assert with require in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kourin1996 committed Jan 9, 2025
1 parent a67a0ad commit 5b7d073
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/rawdb/celo_accessors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestReadAndWritePreGingerbreadBlockBaseFee(t *testing.T) {
// Make sure that the data is not found
record0, err := ReadPreGingerbreadBlockBaseFee(db, hash)
require.NoError(t, err)
assert.Nil(t, record0)
require.Nil(t, record0)

// Write data
err = WritePreGingerbreadBlockBaseFee(db, hash, value)
Expand Down
5 changes: 3 additions & 2 deletions internal/ethapi/celo_block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,9 @@ func Test_retrievePreGingerbreadBlockBaseFee(t *testing.T) {
baseFee, err := retrievePreGingerbreadBlockBaseFee(context.Background(), backend, test.height)

assert.Equal(t, test.expected, baseFee)

if test.err == nil {
assert.NoError(t, err)
require.NoError(t, err)
} else {
assert.EqualError(t, err, test.err.Error())
}
Expand Down Expand Up @@ -371,7 +372,7 @@ func Test_parseGasPriceMinimumUpdated(t *testing.T) {
assert.Equal(t, test.result, result)

if test.err == nil {
assert.NoError(t, err)
require.NoError(t, err)
} else {
assert.EqualError(t, err, test.err.Error())
}
Expand Down

0 comments on commit 5b7d073

Please sign in to comment.