forked from TrueCloudLab/frostfs-api-go
099347d3bc
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
34 lines
1.5 KiB
Go
34 lines
1.5 KiB
Go
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.GenerateAnnounceLocalTrustRequestBody(empty) },
|
|
func(empty bool) message.Message { return reputationtest.GenerateAnnounceLocalTrustRequest(empty) },
|
|
func(empty bool) message.Message { return reputationtest.GenerateAnnounceLocalTrustResponseBody(empty) },
|
|
func(empty bool) message.Message { return reputationtest.GenerateAnnounceLocalTrustResponse(empty) },
|
|
func(empty bool) message.Message {
|
|
return reputationtest.GenerateAnnounceIntermediateResultRequestBody(empty)
|
|
},
|
|
func(empty bool) message.Message {
|
|
return reputationtest.GenerateAnnounceIntermediateResultRequest(empty)
|
|
},
|
|
func(empty bool) message.Message {
|
|
return reputationtest.GenerateAnnounceIntermediateResultResponseBody(empty)
|
|
},
|
|
func(empty bool) message.Message {
|
|
return reputationtest.GenerateAnnounceIntermediateResultResponse(empty)
|
|
},
|
|
func(empty bool) message.Message { return reputationtest.GenerateGlobalTrustBody(empty) },
|
|
func(empty bool) message.Message { return reputationtest.GenerateGlobalTrust(empty) },
|
|
func(empty bool) message.Message { return reputationtest.GeneratePeerToPeerTrust(empty) },
|
|
)
|
|
}
|