forked from TrueCloudLab/frostfs-api-go
[#168] session: Implement binary/JSON encoders/decoders on ResponseVerify
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
edf6ec05b3
commit
6456fcf8fa
4 changed files with 45 additions and 4 deletions
|
@ -102,3 +102,15 @@ func TestResponseMetaHeaderJSON(t *testing.T) {
|
|||
|
||||
require.Equal(t, r, r2)
|
||||
}
|
||||
|
||||
func TestResponseVerificationHeaderJSON(t *testing.T) {
|
||||
r := generateResponseVerificationHeader("key", "value")
|
||||
|
||||
data, err := r.MarshalJSON()
|
||||
require.NoError(t, err)
|
||||
|
||||
r2 := new(session.ResponseVerificationHeader)
|
||||
require.NoError(t, r2.UnmarshalJSON(data))
|
||||
|
||||
require.Equal(t, r, r2)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue