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-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
|
|
|
)
|
|
|
|
|
2021-11-12 11:19:16 +00:00
|
|
|
// Result returns random audit.Result.
|
|
|
|
func Result() *audit.Result {
|
2022-03-14 11:30:07 +00:00
|
|
|
var x audit.Result
|
2021-11-08 12:13:59 +00:00
|
|
|
|
2022-03-14 11:30:07 +00:00
|
|
|
x.ForContainer(*cidtest.ID())
|
|
|
|
x.SetAuditorKey([]byte("key"))
|
|
|
|
x.Complete()
|
|
|
|
x.ForEpoch(44)
|
|
|
|
x.SetHits(55)
|
|
|
|
x.SetMisses(66)
|
|
|
|
x.SetFailures(77)
|
|
|
|
x.SetRequestsPoR(88)
|
|
|
|
x.SetRequestsPoR(99)
|
|
|
|
x.SubmitFailedStorageNodes([][]byte{
|
2021-11-08 12:13:59 +00:00
|
|
|
[]byte("node1"),
|
|
|
|
[]byte("node2"),
|
|
|
|
})
|
2022-03-14 11:30:07 +00:00
|
|
|
x.SubmitPassedStorageNodes([][]byte{
|
2021-11-08 12:13:59 +00:00
|
|
|
[]byte("node3"),
|
|
|
|
[]byte("node4"),
|
|
|
|
})
|
2022-03-14 11:30:07 +00:00
|
|
|
x.SubmitPassedStorageGroup(*oidtest.ID())
|
|
|
|
x.SubmitPassedStorageGroup(*oidtest.ID())
|
|
|
|
x.SubmitFailedStorageGroup(*oidtest.ID())
|
|
|
|
x.SubmitFailedStorageGroup(*oidtest.ID())
|
2021-11-08 12:13:59 +00:00
|
|
|
|
2022-03-14 11:30:07 +00:00
|
|
|
return &x
|
2021-11-08 12:13:59 +00:00
|
|
|
}
|