mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-27 13:11:38 +02:00
fix tests
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
parent
1be41d54a7
commit
a618a065a7
@ -241,9 +241,13 @@ func TestAccount_getPeersByPolicy(t *testing.T) {
|
|||||||
|
|
||||||
t.Run("check that all peers get map", func(t *testing.T) {
|
t.Run("check that all peers get map", func(t *testing.T) {
|
||||||
for _, p := range account.Peers {
|
for _, p := range account.Peers {
|
||||||
|
if p.ID == "peerK" {
|
||||||
|
// skip peerK, it has no connections(old peer with no port range support)
|
||||||
|
continue
|
||||||
|
}
|
||||||
peers, firewallRules := account.GetPeerConnectionResources(context.Background(), p, validatedPeers)
|
peers, firewallRules := account.GetPeerConnectionResources(context.Background(), p, validatedPeers)
|
||||||
assert.GreaterOrEqual(t, len(peers), 1, "minimum number peers should present")
|
assert.GreaterOrEqual(t, len(peers), 2, "minimum number peers should present")
|
||||||
assert.GreaterOrEqual(t, len(firewallRules), 1, "minimum number of firewall rules should present")
|
assert.GreaterOrEqual(t, len(firewallRules), 2, "minimum number of firewall rules should present")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user