forked from TrueCloudLab/frostfs-api-go
[#307] v2/storagegroup/test: Do not allocate memory if !empty
Move all memory allocation and field settings in `Generate...(empty bool)` functions behind `if !empty` check. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
383edb1be4
commit
9dfc7e7fe9
1 changed files with 1 additions and 1 deletions
|
@ -11,10 +11,10 @@ func GenerateStorageGroup(empty bool) *storagegroup.StorageGroup {
|
||||||
if !empty {
|
if !empty {
|
||||||
m.SetValidationDataSize(44)
|
m.SetValidationDataSize(44)
|
||||||
m.SetExpirationEpoch(55)
|
m.SetExpirationEpoch(55)
|
||||||
|
m.SetMembers(refstest.GenerateObjectIDs(false))
|
||||||
}
|
}
|
||||||
|
|
||||||
m.SetValidationHash(refstest.GenerateChecksum(empty))
|
m.SetValidationHash(refstest.GenerateChecksum(empty))
|
||||||
m.SetMembers(refstest.GenerateObjectIDs(empty))
|
|
||||||
|
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue