MCP servers 2026-10-10 13:12 UTC
linkedin-mcp-server
Committed by stickerdaniel. Update Category: Testing & Quality Assurance. Commit details: test(daemon): Keep daemon state in a temporary home (#1276). This update adds test cases for better regression coverage.
CommitRaw commit message
test(daemon): Keep daemon state in a temporary home (#1276) ## Problem `daemon_state_root()` reads the account home from the OS and ignores `HOME`, so a launcher cannot split one account's election. Tests that start a real owner therefore wrote lock and descriptor files under the developer's real `~/.mcp-server-linkedin/daemon` and deleted them afterwards. That breaks "Tests must write artifacts only to temporary directories, including in subprocesses." ## Solution - `_account_home()` reads `LINKEDIN_MCP_TEST_ACCOUNT_HOME` first. The value goes through the same checks as the account entry. Only `tests/conftest.py` sets it, and owners inherit it from their frontend. Unset, nothing changes. - An autouse fixture gives every test its own temporary account home. A teardown check fails any test whose processes still write under the real root. - The real-root cleanup in the election and liveness tests is gone. ## Verification - Planted faults (variable ignored, or dropped for the owner only) fail exactly the 21 real-owner tests. - Full suite: 8278 passed. The real root did not change. ## Synthetic prompt > Make every test, including spawned daemon owners, keep daemon lock and descriptor files in a temporary directory instead of the real account home, without changing runtime behaviour, and fail any test that writes there. Generated with Claude Opus 5.5 for implementation and GPT-6.1 Sol for review in Claude Code via T3 Code.