[#1423] session: Upgrade SDK package
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
dda56f1319
commit
4c8ec20e32
41 changed files with 740 additions and 663 deletions
|
@ -14,6 +14,7 @@ import (
|
|||
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
|
||||
cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/eacl"
|
||||
sessiontest "github.com/nspcc-dev/neofs-sdk-go/session/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
@ -42,6 +43,9 @@ func TestInvalidToken(t *testing.T) {
|
|||
var cnrV2 refs.ContainerID
|
||||
cnr.WriteToV2(&cnrV2)
|
||||
|
||||
var tokV2 session.Token
|
||||
sessiontest.ContainerSigned().WriteToV2(&tokV2)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
op func(e containerSvc.ServiceExecutor, ctx containerSvc.ContextWithToken) error
|
||||
|
@ -84,9 +88,9 @@ func TestInvalidToken(t *testing.T) {
|
|||
Context: context.Background(),
|
||||
SessionToken: generateToken(new(session.ObjectSessionContext)),
|
||||
}
|
||||
require.Error(t, test.op(e, ctx), containerSvcMorph.ErrInvalidContext)
|
||||
require.Error(t, test.op(e, ctx))
|
||||
|
||||
ctx.SessionToken = generateToken(new(session.ContainerSessionContext))
|
||||
ctx.SessionToken = &tokV2
|
||||
require.NoError(t, test.op(e, ctx))
|
||||
|
||||
ctx.SessionToken = nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue