[#293] pkg/eacl: Implement and use generator of Table

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-06-08 11:26:23 +03:00 committed by Alex Vanin
parent f406463c34
commit 72adf5f972
2 changed files with 14 additions and 4 deletions

View file

@ -4,6 +4,7 @@ import (
"github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl"
cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test"
ownertest "github.com/nspcc-dev/neofs-api-go/pkg/owner/test"
sessiontest "github.com/nspcc-dev/neofs-api-go/pkg/session/test"
)
// Target returns random eacl.Target.
@ -31,3 +32,14 @@ func Record() *eacl.Record {
return x
}
func Table() *eacl.Table {
x := eacl.NewTable()
x.SetCID(cidtest.Generate())
x.SetSessionToken(sessiontest.Generate())
x.AddRecord(Record())
x.AddRecord(Record())
return x
}