From 88a3829b3917871c0bb0e6e7baa7387cc244bd24 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 8 Jun 2021 11:18:36 +0300 Subject: [PATCH] [#293] pkg/eacl: Implement and use generator of Target Signed-off-by: Leonard Lyubich --- pkg/acl/eacl/test/generate.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 pkg/acl/eacl/test/generate.go diff --git a/pkg/acl/eacl/test/generate.go b/pkg/acl/eacl/test/generate.go new file mode 100644 index 00000000..25697e99 --- /dev/null +++ b/pkg/acl/eacl/test/generate.go @@ -0,0 +1,18 @@ +package eacltest + +import ( + "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" +) + +// Target returns random eacl.Target. +func Target() *eacl.Target { + x := eacl.NewTarget() + + x.SetRole(eacl.RoleSystem) + x.SetBinaryKeys([][]byte{ + {1, 2, 3}, + {4, 5, 6}, + }) + + return x +}