2021-03-12 12:57:23 +00:00
|
|
|
package audittest
|
|
|
|
|
|
|
|
import (
|
2022-12-09 11:16:24 +00:00
|
|
|
"github.com/TrueCloudLab/frostfs-api-go/v2/audit"
|
|
|
|
refstest "github.com/TrueCloudLab/frostfs-api-go/v2/refs/test"
|
2021-03-12 12:57:23 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
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)
|
2021-06-11 11:58:32 +00:00
|
|
|
m.SetVersion(refstest.GenerateVersion(false))
|
|
|
|
m.SetContainerID(refstest.GenerateContainerID(false))
|
|
|
|
m.SetPassSG(refstest.GenerateObjectIDs(false))
|
|
|
|
m.SetFailSG(refstest.GenerateObjectIDs(false))
|
2021-03-12 12:57:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return m
|
|
|
|
}
|