Skip to content

Commit

Permalink
Enhanced test
Browse files Browse the repository at this point in the history
  • Loading branch information
SionoiS committed Oct 27, 2023
1 parent 3e5c70e commit 994b9d4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_waku_metadata.nim
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import
eth/p2p/discoveryv5/enr
import
../../waku/waku_node,
../../waku/waku_core/topics,
../../waku/node/peer_manager,
../../waku/waku_discv5,
../../waku/waku_metadata,
Expand All @@ -23,8 +24,6 @@ import


procSuite "Waku Metadata Protocol":

# TODO: Add tests with shards when ready
asyncTest "request() returns the supported metadata of the peer":
let clusterId = 10.uint32
let
Expand All @@ -34,6 +33,9 @@ procSuite "Waku Metadata Protocol":
# Start nodes
await allFutures([node1.start(), node2.start()])

node1.topicSubscriptionQueue.emit((kind: PubsubSub, topic: "/waku/2/rs/1/7"))
node1.topicSubscriptionQueue.emit((kind: PubsubSub, topic: "/waku/2/rs/1/6"))

# Create connection
let connOpt = await node2.peerManager.dialPeer(node1.switch.peerInfo.toRemotePeerInfo(), WakuMetadataCodec)
require:
Expand All @@ -48,3 +50,5 @@ procSuite "Waku Metadata Protocol":

check:
response1.get().clusterId.get() == clusterId
response1.get().shards == @[uint32(6), uint32(7)]

0 comments on commit 994b9d4

Please sign in to comment.