frostfs-api-go/reputation/message_test.go

35 lines
1.6 KiB
Go
Raw Permalink Normal View History

package reputation_test
import (
"testing"
reputationtest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/reputation/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
messagetest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message/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) },
)
}