2021-03-24 07:10:51 +00:00
|
|
|
package reputation_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
reputationtest "github.com/nspcc-dev/neofs-api-go/v2/reputation/test"
|
2021-11-16 17:30:55 +00:00
|
|
|
"github.com/nspcc-dev/neofs-api-go/v2/rpc/message"
|
|
|
|
messagetest "github.com/nspcc-dev/neofs-api-go/v2/rpc/message/test"
|
2021-03-24 07:10:51 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestMessageConvert(t *testing.T) {
|
|
|
|
messagetest.TestRPCMessage(t,
|
|
|
|
func(empty bool) message.Message { return reputationtest.GenerateTrust(empty) },
|
2021-05-07 09:34:24 +00:00
|
|
|
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) },
|
2021-04-01 14:53:14 +00:00
|
|
|
func(empty bool) message.Message {
|
2021-05-07 09:34:24 +00:00
|
|
|
return reputationtest.GenerateAnnounceIntermediateResultRequestBody(empty)
|
2021-04-01 14:53:14 +00:00
|
|
|
},
|
|
|
|
func(empty bool) message.Message {
|
2021-05-07 09:34:24 +00:00
|
|
|
return reputationtest.GenerateAnnounceIntermediateResultRequest(empty)
|
|
|
|
},
|
|
|
|
func(empty bool) message.Message {
|
|
|
|
return reputationtest.GenerateAnnounceIntermediateResultResponseBody(empty)
|
|
|
|
},
|
|
|
|
func(empty bool) message.Message {
|
|
|
|
return reputationtest.GenerateAnnounceIntermediateResultResponse(empty)
|
2021-04-01 14:53:14 +00:00
|
|
|
},
|
|
|
|
func(empty bool) message.Message { return reputationtest.GenerateGlobalTrustBody(empty) },
|
|
|
|
func(empty bool) message.Message { return reputationtest.GenerateGlobalTrust(empty) },
|
2021-04-09 08:28:06 +00:00
|
|
|
func(empty bool) message.Message { return reputationtest.GeneratePeerToPeerTrust(empty) },
|
2021-03-24 07:10:51 +00:00
|
|
|
)
|
|
|
|
}
|