mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-05 02:31:47 +00:00
fix(api_server): fall back to default port on malformed API_SERVER_PORT
This commit is contained in:
parent
65bebb9b80
commit
a5cae16496
2 changed files with 18 additions and 1 deletions
|
|
@ -240,6 +240,12 @@ class TestAdapterInit:
|
|||
"http://127.0.0.1:3000",
|
||||
)
|
||||
|
||||
def test_invalid_port_from_env_falls_back_to_default(self, monkeypatch):
|
||||
monkeypatch.setenv("API_SERVER_PORT", "not-a-port")
|
||||
config = PlatformConfig(enabled=True)
|
||||
adapter = APIServerAdapter(config)
|
||||
assert adapter._port == 8642
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Auth checking
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue