2021-11-08 12:13:59 +00:00
|
|
|
package audittest
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neofs-sdk-go/audit"
|
|
|
|
cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test"
|
2022-01-25 16:20:32 +00:00
|
|
|
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
2022-02-01 10:15:12 +00:00
|
|
|
oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
2021-11-08 12:13:59 +00:00
|
|
|
versiontest "github.com/nspcc-dev/neofs-sdk-go/version/test"
|
2021-11-08 12:13:59 +00:00
|
|
|
)
|
|
|
|
|
2021-11-12 11:19:16 +00:00
|
|
|
// Result returns random audit.Result.
|
|
|
|
func Result() *audit.Result {
|
2021-11-08 12:13:59 +00:00
|
|
|
x := audit.NewResult()
|
|
|
|
|
2021-11-08 12:13:59 +00:00
|
|
|
x.SetVersion(versiontest.Version())
|
2021-11-12 11:19:16 +00:00
|
|
|
x.SetContainerID(cidtest.ID())
|
2021-11-08 12:13:59 +00:00
|
|
|
x.SetPublicKey([]byte("key"))
|
|
|
|
x.SetComplete(true)
|
|
|
|
x.SetAuditEpoch(44)
|
|
|
|
x.SetHit(55)
|
|
|
|
x.SetMiss(66)
|
|
|
|
x.SetFail(77)
|
|
|
|
x.SetRetries(88)
|
|
|
|
x.SetRequests(99)
|
|
|
|
x.SetFailNodes([][]byte{
|
|
|
|
[]byte("node1"),
|
|
|
|
[]byte("node2"),
|
|
|
|
})
|
|
|
|
x.SetPassNodes([][]byte{
|
|
|
|
[]byte("node3"),
|
|
|
|
[]byte("node4"),
|
|
|
|
})
|
2022-03-11 08:53:48 +00:00
|
|
|
x.SetPassSG([]oid.ID{*oidtest.ID(), *oidtest.ID()})
|
|
|
|
x.SetFailSG([]oid.ID{*oidtest.ID(), *oidtest.ID()})
|
2021-11-08 12:13:59 +00:00
|
|
|
|
|
|
|
return x
|
|
|
|
}
|