fix: correctly expire pre-auth-keys in 0.28.0+

This commit is contained in:
Aarnav Tale
2026-04-06 21:36:49 -04:00
parent bdcd4c5bad
commit 10278d0cc9
4 changed files with 19 additions and 8 deletions
+1 -2
View File
@@ -114,8 +114,7 @@ describe.sequential.for(HS_VERSIONS)("Headscale %s: Pre-auth Keys", (version) =>
const preAuthKeys = await client.getPreAuthKeys(preAuthKeyUser.id);
expect(preAuthKeys.length).toBeGreaterThanOrEqual(2);
const preAuthKeyToExpire = preAuthKeys[0];
await client.expirePreAuthKey(preAuthKeyUser.id, preAuthKeyToExpire.key);
await client.expirePreAuthKey(preAuthKeyUser.id, preAuthKeyToExpire);
const preAuthKeysAfterExpire = await client.getPreAuthKeys(preAuthKeyUser.id);
const expiredKey = preAuthKeysAfterExpire.find((key) => key.key === preAuthKeyToExpire.key);