2021-03-24 07:10:51 +00:00
|
|
|
package reputation_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2022-12-09 11:16:24 +00:00
|
|
|
reputationtest "github.com/TrueCloudLab/frostfs-api-go/v2/reputation/test"
|
|
|
|
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
|
|
|
|
messagetest "github.com/TrueCloudLab/frostfs-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
|
|
|
)
|
|
|
|
}
|