mirror of
https://github.com/juanfont/headscale.git
synced 2026-11-05 04:59:26 +09:00
mapper: show an expired peer online, without endpoints or DERP
A connected expired node shows online to its peers. Neither its map entry nor endpoint, DERP or disco patches carry the paths to reach it.
This commit is contained in:
1 parent
6153b4fde3
commit
be2f5333f4
9 files changed
+39
-70
No files matched your search
@@ -1266,11 +1266,13 @@ func TestExpireNode(t *testing.T) {
|
||||
return
|
||||
}
|
||||
assert.True(c, expired.Expired)
|
||||
assert.False(c, expired.Online)
|
||||
// It keeps its control connection, so it stays online to
|
||||
// its peers, as on Tailscale SaaS.
|
||||
assert.True(c, expired.Online)
|
||||
if assert.NotNil(c, expired.KeyExpiry) {
|
||||
assert.True(c, expired.KeyExpiry.Before(time.Now()))
|
||||
}
|
||||
}, integrationutil.StatusReadyTimeout, integrationutil.FastPoll, "peer must see the expired node offline")
|
||||
}, integrationutil.StatusReadyTimeout, integrationutil.FastPoll, "peer must see the expired node expired and online")
|
||||
|
||||
require.EventuallyWithT(t, func(c *assert.CollectT) {
|
||||
_, stderr, _ := peer.Execute([]string{"tailscale", "ping", node.Name})
|
||||
|
||||
Reference in new issue
Block a user