*: use require.ErrorIs instead of require.True(t, error.Is())
This is just a much better way to do the same thing. Inspired by nspcc-dev/neofs-sdk-go#407. Signed-off-by: Roman Khimov <roman@nspcc.ru>
This commit is contained in:
parent
8e6025fbc8
commit
433275265f
27 changed files with 109 additions and 133 deletions
|
@ -6,7 +6,6 @@ import (
|
|||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/big"
|
||||
"net/http"
|
||||
|
@ -2013,7 +2012,7 @@ func TestGetNetwork(t *testing.T) {
|
|||
c.getNextRequestID = getTestRequestID
|
||||
// network was not initialised
|
||||
_, err = c.GetNetwork()
|
||||
require.True(t, errors.Is(err, errNetworkNotInitialized))
|
||||
require.ErrorIs(t, err, errNetworkNotInitialized)
|
||||
require.Equal(t, false, c.cache.initDone)
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue