forked from TrueCloudLab/frostfs-api-go
Add v2
version to go module name
Replace all elements from `v2` to root directory. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
2d70391e31
commit
25da5d2e13
267 changed files with 116 additions and 17991 deletions
29
audit/test/generate.go
Normal file
29
audit/test/generate.go
Normal file
|
@ -0,0 +1,29 @@
|
|||
package audittest
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/audit"
|
||||
refstest "github.com/nspcc-dev/neofs-api-go/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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue