forked from TrueCloudLab/frostfs-api-go
[#233] Implement data audit result type with basic methods
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
3039aa20c7
commit
9986a4ecd1
9 changed files with 959 additions and 0 deletions
20
v2/audit/json_test.go
Normal file
20
v2/audit/json_test.go
Normal file
|
@ -0,0 +1,20 @@
|
|||
package audit_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/audit"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestDataAuditResultJSON(t *testing.T) {
|
||||
a := generateDataAuditResult()
|
||||
|
||||
data, err := a.MarshalJSON()
|
||||
require.NoError(t, err)
|
||||
|
||||
a2 := new(audit.DataAuditResult)
|
||||
require.NoError(t, a2.UnmarshalJSON(data))
|
||||
|
||||
require.Equal(t, a, a2)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue