2021-11-08 12:13:59 +00:00
|
|
|
package audittest
|
|
|
|
|
|
|
|
import (
|
2022-12-13 14:36:35 +00:00
|
|
|
"github.com/TrueCloudLab/frostfs-sdk-go/audit"
|
|
|
|
cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test"
|
|
|
|
oidtest "github.com/TrueCloudLab/frostfs-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-04-11 16:25:14 +00:00
|
|
|
x.ForContainer(cidtest.ID())
|
2022-03-14 11:30:07 +00:00
|
|
|
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-04-11 16:25:14 +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
|
|
|
}
|