mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-08 21:24:50 -05:00
ensure final dot on node name (#2503)
* ensure final dot on node name This ensures that nodes which have a base domain set, will have a dot appended to their FQDN. Resolves: https://github.com/juanfont/headscale/issues/2501 * improve OIDC TTL expire test Waiting a bit more than the TTL of the OIDC token seems to remove some flakiness of this test. This furthermore makes use of a go func safe buffer which should avoid race conditions.
This commit is contained in:
@@ -170,10 +170,11 @@ func TestOIDCExpireNodesBasedOnTokenExpiry(t *testing.T) {
|
||||
t.Logf("%d successful pings out of %d (before expiry)", success, len(allClients)*len(allIps))
|
||||
|
||||
// This is not great, but this sadly is a time dependent test, so the
|
||||
// safe thing to do is wait out the whole TTL time before checking if
|
||||
// the clients have logged out. The Wait function can't do it itself
|
||||
// as it has an upper bound of 1 min.
|
||||
time.Sleep(shortAccessTTL)
|
||||
// safe thing to do is wait out the whole TTL time (and a bit more out
|
||||
// of safety reasons) before checking if the clients have logged out.
|
||||
// The Wait function can't do it itself as it has an upper bound of 1
|
||||
// min.
|
||||
time.Sleep(shortAccessTTL + 10*time.Second)
|
||||
|
||||
assertTailscaleNodesLogout(t, allClients)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user