*: 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:
Roman Khimov 2023-05-04 17:03:06 +03:00
parent 8e6025fbc8
commit 433275265f
27 changed files with 109 additions and 133 deletions

View file

@ -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)
})