diff --git a/client/status/v2.go b/client/status/v2.go index 7ef0c8e1..42a97208 100644 --- a/client/status/v2.go +++ b/client/status/v2.go @@ -36,6 +36,7 @@ func FromStatusV2(st *status.Status) Status { switch code := st.Code(); { case status.IsSuccess(code): + //nolint:exhaustive switch status.LocalizeSuccess(&code); code { case status.OK: decoder = new(SuccessDefaultV2) diff --git a/netmap/helper_test.go b/netmap/helper_test.go index 5971013c..bb5b6d3c 100644 --- a/netmap/helper_test.go +++ b/netmap/helper_test.go @@ -3,7 +3,6 @@ package netmap import ( "testing" - subnetid "github.com/nspcc-dev/neofs-sdk-go/subnet/id" "github.com/stretchr/testify/require" ) @@ -43,12 +42,6 @@ func newReplica(c uint32, s string) *Replica { return r } -func newSubnetID(id uint32) *subnetid.ID { - var s subnetid.ID - s.SetNumber(id) - return &s -} - func nodeInfoFromAttributes(props ...string) NodeInfo { attrs := make([]*NodeAttribute, len(props)/2) for i := range attrs { @@ -61,14 +54,6 @@ func nodeInfoFromAttributes(props ...string) NodeInfo { return *n } -func getTestNode(props ...string) *Node { - m := make(map[string]string, len(props)/2) - for i := 0; i < len(props); i += 2 { - m[props[i]] = props[i+1] - } - return &Node{AttrMap: m} -} - type enumIface interface { FromString(string) bool String() string diff --git a/pool/pool.go b/pool/pool.go index 3c48d0c5..d2495763 100644 --- a/pool/pool.go +++ b/pool/pool.go @@ -181,7 +181,6 @@ type clientPack struct { type CallOption func(config *callConfig) type callConfig struct { - isRetry bool useDefaultSession bool key *ecdsa.PrivateKey @@ -207,12 +206,6 @@ func WithSession(token *session.Token) CallOption { } } -func retry() CallOption { - return func(config *callConfig) { - config.isRetry = true - } -} - func useDefaultSession() CallOption { return func(config *callConfig) { config.useDefaultSession = true diff --git a/pool/pool_test.go b/pool/pool_test.go index be882d4a..d1fbd4c9 100644 --- a/pool/pool_test.go +++ b/pool/pool_test.go @@ -357,7 +357,7 @@ func TestSessionCache(t *testing.T) { require.NoError(t, err) require.Contains(t, tokens, st) - _, err = pool.GetObject(ctx, address.Address{}, retry()) + _, err = pool.GetObject(ctx, address.Address{}) require.Error(t, err) // cache must not contain session token