Repository navigation
Conversation
Owner
|
Thanks for this. #175 just merged and overlaps with integration.test.ts, and #177 and #178 both change handlers.test.ts. Could you rebase on main once those are in? After that it's good to go from my side. Generated by Claude Code |
8 of 14 tasks
Signed-off-by: Asahi Arataki <[email protected]>
laozhej
force-pushed
the
test/164-shared-ssh-handler-coverage
branch
from
November 27, 2026 06:06
23d0bb9 to
c6d9db7
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The handler, integration and confirm-gate suites now share an SSH mock factory that retains the real module and replaces only
execSSH. Shared hooks reset queued replies and implementations and restoreHOMELAB_*settings after each test.Added 28 handler cases covering the remaining 15 untested tools, plus per-node AdGuard configuration, Pi status fan-out, NPM certificate request/error paths and Compose discovery/timeouts. All 57 registered tools now have handler coverage across the three suites. Removed the unused
checkSSHAvailablewrapper.Why
Fixes #164. Copied configuration, timeout and error helpers let tests pass against behavior that differed from production, and
clearAllMocksleft implementations and queued replies behind.This overlaps #175 only in resetting the integration suite's SSH mock. Its dynamic-import cleanup remains separate; this PR does not depend on it. The Speedtest handler test exercises per-node configuration and connection errors without depending on the API changes in #176.
Type
Testing
cd mcp-server && npm run build && npm testpassespytest tests/ -v --tb=shortpassesLocal Node 22.23.0: build and
npm run typecheckpassed; 637 TypeScript tests passed, with the 10 opt-in live-Pi tests skipped. All 273 Python structure tests passed. The three affected suites also passed with shuffled execution (--sequence.shuffle --sequence.seed=164): 208 tests. Audited the registered tool list against handler invocations: 57 of 57 covered.No live Pi was used. Handler tests mock SSH transport; they do not execute remote commands or certify live service behavior.
Checklist
README/CLAUDE updates are not applicable: no tools, skills or rules were added or removed. Test authentication strings are fixtures only. Prepared with OpenAI Codex assistance; changes reviewed and the checks above run locally. The commit includes the required matching DCO sign-off.