Skip to content

fix: run SSH end-to-end tests on pull requests - #179

Open
laozhej wants to merge 1 commit into
TMHSDigital:mainfrom
laozhej:fix/151-ssh-e2e
Open

laozhej wants to merge 1 commit into
TMHSDigital:mainfrom
laozhej:fix/151-ssh-e2e

Conversation

@laozhej

@laozhej laozhej commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Adds an OpenSSH fixture job to the e2e workflow on every pull request. A small Debian container accepts a freshly generated client key on a random loopback port. Eight tests exercise the real execSSH path, private-key loading, sshTest, kernelInfo, networkInfo, diskUsage on /tmp, healthCheck, and nonzero exit/stderr handling. The runner removes its container and temporary keys on exit.

The optional live-Pi suite now has explicit 60-second test timeouts, probes /var/log instead of /, and runs only its own test file. Manual dispatch without PI_CONFIGURED=true reports a configuration error. Live-Pi secrets are never used on pull requests. CONTRIBUTING.md documents both test paths.

Why

Closes #151. Previously, scheduled tests were skipped when no Pi was configured, and the suite's default timeout was shorter than normal SSH operations. The new fixture provides a real SSH test path without depending on home-lab hardware or credentials.

Type

  • New MCP tool
  • New skill
  • New rule
  • Bug fix
  • Documentation
  • Other: CI and end-to-end coverage

Testing

  • cd mcp-server && npm run build && npm test passes
  • pytest tests/ -v --tb=short passes
  • Tested against a live Pi (not used)

Local Node 22.23.0: build and npm run typecheck pass; 609 tests pass, with 10 live-Pi and 8 OpenSSH-fixture tests skipped. All 273 Python structure tests pass. Shell syntax, workflow YAML/trigger checks and git diff --check pass.

The hosted OpenSSH fixture job passed all eight tests against the container. Docker is unavailable locally, so this validation ran on GitHub-hosted Ubuntu. The optional live-Pi job correctly skipped on this pull request.

Checklist

  • No secrets or credentials committed
  • CHANGELOG.md updated
  • README.md updated (not applicable; no tools, skills or rules added)
  • CLAUDE.md updated (not applicable; no tools, skills or rules added)

Implemented and checked with Codex assistance. The commit includes the required DCO sign-off. Production tool behavior, versions and generated site files are unchanged.

@github-actions github-actions Bot added ci documentation Improvements or additions to documentation mcp labels Nov 22, 2026
@laozhej
laozhej marked this pull request as ready for review November 22, 2026 04:07
@laozhej
laozhej requested a review from TMHSDigital as a code owner November 22, 2026 04:07

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci documentation Improvements or additions to documentation mcp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Live-Pi e2e suite never runs and would time out at Vitest's 5s default

1 participant