service: test coverage for CheckOwner

This commit is contained in:
Evgeniy Kulikov 2019-11-26 13:42:47 +03:00
parent eda9ea3829
commit 40038cc860
No known key found for this signature in database
GPG key ID: BF6AEE0A2A699BF2

View file

@ -9,6 +9,7 @@ import (
"github.com/gogo/protobuf/proto"
crypto "github.com/nspcc-dev/neofs-crypto"
"github.com/nspcc-dev/neofs-crypto/test"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
)
@ -78,6 +79,12 @@ func TestMaintainableRequest(t *testing.T) {
}
}
{ // Validate owner
user, err := refs.NewOwnerID(&owner.PublicKey)
require.NoError(t, err)
require.NoError(t, req.CheckOwner(user))
}
{ // Good case:
require.NoError(t, VerifyRequestHeader(req))