From 640c5c346cf66bb681a4352ae23131587270dcbc Mon Sep 17 00:00:00 2001 From: Murali Reddy Date: Thu, 24 Oct 2019 14:23:57 +0530 Subject: [PATCH] add mocks for GossipNeighbourSubset --- ipam/testutils_test.go | 3 +++ testing/gossip/mocks.go | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/ipam/testutils_test.go b/ipam/testutils_test.go index ccd6efe1..8761d793 100644 --- a/ipam/testutils_test.go +++ b/ipam/testutils_test.go @@ -65,6 +65,9 @@ func (m *mockGossipComms) GossipBroadcast(update mesh.GossipData) { } } +func (m *mockGossipComms) GossipNeighbourSubset(update mesh.GossipData) { + m.GossipBroadcast(update) +} func equalByteBuffer(a, b []byte) bool { if len(a) != len(b) { return false diff --git a/testing/gossip/mocks.go b/testing/gossip/mocks.go index 8cafd89d..2824e83a 100644 --- a/testing/gossip/mocks.go +++ b/testing/gossip/mocks.go @@ -199,3 +199,7 @@ func (client TestRouterClient) GossipUnicast(dstPeerName mesh.PeerName, buf []by func (client TestRouterClient) GossipBroadcast(update mesh.GossipData) { client.router.gossipBroadcast(client.sender, update) } + +func (client TestRouterClient) GossipNeighbourSubset(update mesh.GossipData) { + client.router.gossip(client.sender, update) +}