forked from TrueCloudLab/frostfs-api-go
[#265] reputation: Implement converters and encoding methods on messages
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
0cbb8d0913
commit
3adfdc5005
4 changed files with 378 additions and 0 deletions
19
v2/reputation/message_test.go
Normal file
19
v2/reputation/message_test.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package reputation_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/rpc/message"
|
||||
messagetest "github.com/nspcc-dev/neofs-api-go/rpc/message/test"
|
||||
reputationtest "github.com/nspcc-dev/neofs-api-go/v2/reputation/test"
|
||||
)
|
||||
|
||||
func TestMessageConvert(t *testing.T) {
|
||||
messagetest.TestRPCMessage(t,
|
||||
func(empty bool) message.Message { return reputationtest.GenerateTrust(empty) },
|
||||
func(empty bool) message.Message { return reputationtest.GenerateSendLocalTrustRequestBody(empty) },
|
||||
func(empty bool) message.Message { return reputationtest.GenerateSendLocalTrustRequest(empty) },
|
||||
func(empty bool) message.Message { return reputationtest.GenerateSendLocalTrustResponseBody(empty) },
|
||||
func(empty bool) message.Message { return reputationtest.GenerateSendLocalTrustResponse(empty) },
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue