Refresh gateway listener auth before relay connect

This commit is contained in:
HumbleTurtle
2026-05-07 19:57:26 -03:00
parent c0d3c0c89a
commit 97071a42aa
2 changed files with 49 additions and 7 deletions
+14
View File
@@ -57,6 +57,20 @@ def run():
assert mod.TOKEN == "fresh"
assert mod.TOKEN_EXPIRES_AT == "new"
mod.load_public_auth_file = lambda: {
"base_url": "https://api.example.test",
"project_id": "project_1",
"worker_name": "agent",
"device_fingerprint": "device",
"root_path": "/repo",
"worker_capabilities": {"local_mcp": True, "gateway": True},
"token": "newer",
"token_expires_at": "later",
}
mod.refresh_public_auth_state()
assert mod.TOKEN == "newer"
assert mod.TOKEN_EXPIRES_AT == "later"
try:
mod.save_auth({"gateway_default_command": "bash -l"})
except RuntimeError as exc: