mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
022b6667e5
* checkpoint progress * add roundtrip tests * change all * remove error response * clean up * Update beacon-chain/sync/error_test.go Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com> * gaz * fix tests * fmt * gaz * change back * fix again * clean up * deep source * fix all tests * add gaz * fix tests Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
20 lines
863 B
Go
20 lines
863 B
Go
package p2p
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/p2p/types"
|
|
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
|
"github.com/prysmaticlabs/prysm/shared/testutil/assert"
|
|
)
|
|
|
|
func TestVerifyRPCMappings(t *testing.T) {
|
|
assert.NoError(t, VerifyTopicMapping(RPCStatusTopic, &pb.Status{}), "Failed to verify status rpc topic")
|
|
assert.NotNil(t, VerifyTopicMapping(RPCStatusTopic, new([]byte)), "Incorrect message type verified for status rpc topic")
|
|
|
|
assert.NoError(t, VerifyTopicMapping(RPCMetaDataTopic, new(interface{})), "Failed to verify metadata rpc topic")
|
|
assert.NotNil(t, VerifyTopicMapping(RPCStatusTopic, new([]byte)), "Incorrect message type verified for metadata rpc topic")
|
|
|
|
assert.NoError(t, VerifyTopicMapping(RPCBlocksByRootTopic, new(types.BeaconBlockByRootsReq)), "Failed to verify blocks by root rpc topic")
|
|
}
|