forked from TrueCloudLab/frostfs-api-go
[#234] Update audit result struct definition
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
9986a4ecd1
commit
1c25c3904b
8 changed files with 196 additions and 50 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"crypto/sha256"
|
||||
"testing"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg"
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/audit"
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/container"
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/object"
|
||||
|
@ -32,6 +33,7 @@ func testOID() *object.ID {
|
|||
|
||||
func TestResult(t *testing.T) {
|
||||
r := audit.NewResult()
|
||||
require.Equal(t, pkg.SDKVersion(), r.Version())
|
||||
|
||||
epoch := uint64(13)
|
||||
r.SetAuditEpoch(epoch)
|
||||
|
@ -45,6 +47,9 @@ func TestResult(t *testing.T) {
|
|||
r.SetPublicKey(key)
|
||||
require.Equal(t, key, r.PublicKey())
|
||||
|
||||
r.SetComplete(true)
|
||||
require.True(t, r.Complete())
|
||||
|
||||
passSG := []*object.ID{testOID(), testOID()}
|
||||
r.SetPassSG(passSG)
|
||||
require.Equal(t, passSG, r.PassSG())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue