mirror of
https://github.com/juanfont/headscale.git
synced 2025-06-10 01:17:20 +02:00
fix test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
8e3f41b046
commit
e10f7104f2
@ -132,23 +132,7 @@ func TestEnablingRoutes(t *testing.T) {
|
|||||||
assert.NotNil(t, peerStatus.PrimaryRoutes)
|
assert.NotNil(t, peerStatus.PrimaryRoutes)
|
||||||
|
|
||||||
assert.Len(t, peerStatus.AllowedIPs.AsSlice(), 3)
|
assert.Len(t, peerStatus.AllowedIPs.AsSlice(), 3)
|
||||||
|
requirePeerSubnetRoutes(t, peerStatus, []netip.Prefix{netip.MustParsePrefix(expectedRoutes[string(peerStatus.ID)])})
|
||||||
if peerStatus.AllowedIPs.Len() > 2 {
|
|
||||||
peerRoute := peerStatus.AllowedIPs.At(2)
|
|
||||||
|
|
||||||
// id starts at 1, we created routes with 0 index
|
|
||||||
assert.Equalf(
|
|
||||||
t,
|
|
||||||
expectedRoutes[string(peerStatus.ID)],
|
|
||||||
peerRoute.String(),
|
|
||||||
"expected route %s to be present on peer %s (%s) in %s (%s) status",
|
|
||||||
expectedRoutes[string(peerStatus.ID)],
|
|
||||||
peerStatus.HostName,
|
|
||||||
peerStatus.ID,
|
|
||||||
client.Hostname(),
|
|
||||||
client.ID(),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user