2022-04-11 06:30:22 +00:00
|
|
|
package usertest
|
|
|
|
|
|
|
|
import (
|
2023-04-25 09:11:42 +00:00
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/nspcc-dev/neofs-sdk-go/crypto/test"
|
2022-04-11 06:30:22 +00:00
|
|
|
"github.com/nspcc-dev/neofs-sdk-go/user"
|
|
|
|
)
|
|
|
|
|
|
|
|
// ID returns random user.ID.
|
2023-04-25 09:11:42 +00:00
|
|
|
func ID(tb testing.TB) *user.ID {
|
2022-04-11 06:30:22 +00:00
|
|
|
var x user.ID
|
2023-04-25 09:11:42 +00:00
|
|
|
if err := user.IDFromSigner(&x, test.RandomSigner(tb)); err != nil {
|
2023-04-25 08:31:27 +00:00
|
|
|
return nil
|
|
|
|
}
|
2022-04-11 06:30:22 +00:00
|
|
|
|
|
|
|
return &x
|
|
|
|
}
|