frostfs-sdk-go/storagegroup/test/generate.go
Evgenii Stratonikov f05ff3901f [#57] storagegroup: move package from neofs-api-go
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-09 12:31:54 +03:00

20 lines
562 B
Go

package storagegrouptest
import (
checksumtest "github.com/nspcc-dev/neofs-sdk-go/checksum/test"
"github.com/nspcc-dev/neofs-sdk-go/object"
objecttest "github.com/nspcc-dev/neofs-sdk-go/object/test"
"github.com/nspcc-dev/neofs-sdk-go/storagegroup"
)
// Generate returns random storagegroup.StorageGroup.
func Generate() *storagegroup.StorageGroup {
x := storagegroup.New()
x.SetExpirationEpoch(66)
x.SetValidationDataSize(322)
x.SetValidationDataHash(checksumtest.Checksum())
x.SetMembers([]*object.ID{objecttest.ID(), objecttest.ID()})
return x
}