service: test coverage for CheckOwner
This commit is contained in:
parent
eda9ea3829
commit
40038cc860
1 changed files with 7 additions and 0 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue