forked from TrueCloudLab/frostfs-node
[#971] *: Add optional parameters to audit morph client calls
Adapt all audit wrapper calls to new structures. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
8a2f5c980b
commit
7ac3145980
2 changed files with 9 additions and 2 deletions
|
@ -6,6 +6,7 @@ import (
|
||||||
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/innerring/processors/governance"
|
"github.com/nspcc-dev/neofs-node/pkg/innerring/processors/governance"
|
||||||
|
auditwrp "github.com/nspcc-dev/neofs-node/pkg/morph/client/audit/wrapper"
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/services/audit"
|
"github.com/nspcc-dev/neofs-node/pkg/services/audit"
|
||||||
control "github.com/nspcc-dev/neofs-node/pkg/services/control/ir"
|
control "github.com/nspcc-dev/neofs-node/pkg/services/control/ir"
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/util/state"
|
"github.com/nspcc-dev/neofs-node/pkg/util/state"
|
||||||
|
@ -145,7 +146,10 @@ func (s *Server) WriteReport(r *audit.Report) error {
|
||||||
res := r.Result()
|
res := r.Result()
|
||||||
res.SetPublicKey(s.pubKey)
|
res.SetPublicKey(s.pubKey)
|
||||||
|
|
||||||
return s.auditClient.PutAuditResult(res)
|
prm := auditwrp.PutPrm{}
|
||||||
|
prm.SetResult(res)
|
||||||
|
|
||||||
|
return s.auditClient.PutAuditResult(prm)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ResetEpochTimer resets block timer that produces events to update epoch
|
// ResetEpochTimer resets block timer that produces events to update epoch
|
||||||
|
|
|
@ -40,7 +40,10 @@ func TestAuditResults(t *testing.T) {
|
||||||
auditRes.SetPublicKey(key.PublicKey().Bytes())
|
auditRes.SetPublicKey(key.PublicKey().Bytes())
|
||||||
auditRes.SetContainerID(id)
|
auditRes.SetContainerID(id)
|
||||||
|
|
||||||
require.NoError(t, auditClientWrapper.PutAuditResult(auditRes))
|
prm := auditWrapper.PutPrm{}
|
||||||
|
prm.SetResult(auditRes)
|
||||||
|
|
||||||
|
require.NoError(t, auditClientWrapper.PutAuditResult(prm))
|
||||||
|
|
||||||
time.Sleep(5 * time.Second)
|
time.Sleep(5 * time.Second)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue