forked from TrueCloudLab/frostfs-sdk-go
[#263] session: Add Sign
/ VerifySignature
test
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
0ef49cf851
commit
bf8312a547
2 changed files with 16 additions and 0 deletions
|
@ -535,3 +535,11 @@ func TestContainer_Issuer(t *testing.T) {
|
||||||
|
|
||||||
require.True(t, token.Issuer().Equals(issuer))
|
require.True(t, token.Issuer().Equals(issuer))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestContainer_Sign(t *testing.T) {
|
||||||
|
val := sessiontest.Container()
|
||||||
|
|
||||||
|
require.NoError(t, val.Sign(randSigner()))
|
||||||
|
|
||||||
|
require.True(t, val.VerifySignature())
|
||||||
|
}
|
||||||
|
|
|
@ -626,3 +626,11 @@ func TestObject_Issuer(t *testing.T) {
|
||||||
|
|
||||||
require.True(t, token.Issuer().Equals(issuer))
|
require.True(t, token.Issuer().Equals(issuer))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestObject_Sign(t *testing.T) {
|
||||||
|
val := sessiontest.Object()
|
||||||
|
|
||||||
|
require.NoError(t, val.Sign(randSigner()))
|
||||||
|
|
||||||
|
require.True(t, val.VerifySignature())
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue