frostfs-api-go/storagegroup/test/generate.go
Leonard Lyubich 49bf6b24b0 [#417] storagegroup: Mark all expiration methods as deprecated
`expiration_epoch` field of `StorageGroup` message has been marked as
deprecated in previous NeoFS API protocol's release.

Mark all method related to the field as deprecated. Leave and use them
for test purposes only.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-09-23 10:30:59 +04:00

21 lines
470 B
Go

package storagegrouptest
import (
refstest "github.com/nspcc-dev/neofs-api-go/v2/refs/test"
"github.com/nspcc-dev/neofs-api-go/v2/storagegroup"
)
func GenerateStorageGroup(empty bool) *storagegroup.StorageGroup {
m := new(storagegroup.StorageGroup)
if !empty {
m.SetValidationDataSize(44)
//nolint:staticcheck
m.SetExpirationEpoch(55)
m.SetMembers(refstest.GenerateObjectIDs(false))
}
m.SetValidationHash(refstest.GenerateChecksum(empty))
return m
}