All checks were successful
* Add plugin option for protogen in Makefile * Fix the generator for the plugin in util/protogen * Erase convertable types, move helpful methods to gRPC protobufs * Erase helpers for convertations * Generate StableMarshlal/StableSize for protobufs by the protoc plugin Signed-off-by: Airat Arifullin a.arifullin@yadro.com
29 lines
735 B
Go
29 lines
735 B
Go
package audittest
|
|
|
|
import (
|
|
audit "git.frostfs.info/TrueCloudLab/aarifullin/v2/audit/grpc"
|
|
refstest "git.frostfs.info/TrueCloudLab/aarifullin/v2/refs/test"
|
|
)
|
|
|
|
func GenerateDataAuditResult(empty bool) *audit.DataAuditResult {
|
|
m := new(audit.DataAuditResult)
|
|
|
|
if !empty {
|
|
m.SetPublicKey([]byte{1, 2, 3})
|
|
m.SetAuditEpoch(13)
|
|
m.SetHit(100)
|
|
m.SetMiss(200)
|
|
m.SetFail(300)
|
|
m.SetComplete(true)
|
|
m.SetPassNodes([][]byte{{1}, {2}})
|
|
m.SetFailNodes([][]byte{{3}, {4}})
|
|
m.SetRequests(666)
|
|
m.SetRetries(777)
|
|
m.SetVersion(refstest.GenerateVersion(false))
|
|
m.SetContainerId(refstest.GenerateContainerID(false))
|
|
m.SetPassSg(refstest.GenerateObjectIDs(false))
|
|
m.SetFailSg(refstest.GenerateObjectIDs(false))
|
|
}
|
|
|
|
return m
|
|
}
|