frostfs-sdk-go/user/test/id.go
Evgenii Baidakov 36b1e8442c
tests: Use dedicated function to generate signers in tests
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-26 15:03:55 +04:00

18 lines
312 B
Go

package usertest
import (
"testing"
"github.com/nspcc-dev/neofs-sdk-go/crypto/test"
"github.com/nspcc-dev/neofs-sdk-go/user"
)
// ID returns random user.ID.
func ID(tb testing.TB) *user.ID {
var x user.ID
if err := user.IDFromSigner(&x, test.RandomSigner(tb)); err != nil {
return nil
}
return &x
}