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