vps-health-api/__tests__
le king fu 7003197abe
All checks were successful
CI / verification (pull_request) Successful in 21s
fix(test-curl): keep the socket pass off the environment (#41)
Behind a proxy from the environment, test-curl.sh sent its 18 curl lines to
the proxy instead of the servers it boots: with a dead proxy it exited 7
after 11 s without a line of output.

- export NO_PROXY and no_proxy, as scripts/boot-from-copy.sh does
- unset FORCE_COLOR: node colours a number even into a pipe, and 8 cases
  compared "3" against a coloured "3"
- wait_for checks the server process before the port and stops the run with
  a message when a server died or never answered
- the EXIT trap guards each kill: under set -e, a failed kill on the first
  server ended the trap and left the second one running on 3098

ci.test.js runs the whole script three times: behind a fake proxy that
answers everything, and with a fake node that fails for each port in turn.

Fixes #41

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 20:12:57 -04:00
..
agent.test.js feat(agent): push workstation metrics to /hosts/<id> from cron 2026-08-16 12:21:59 -04:00
auth.test.js test(auth): pin the single space after the Bearer scheme 2026-09-27 19:23:50 -04:00
ci.test.js fix(test-curl): keep the socket pass off the environment (#41) 2026-10-01 20:12:57 -04:00
findings.test.js feat(defenseurs): add GET /defenseurs/findings?project=X route 2026-05-12 20:56:56 -04:00
health.test.js refactor: extract CPU/RAM/disk collection into metrics.js 2026-08-16 11:30:03 -04:00
hosts.test.js test(hosts): pin the symlink guard and the regex anchor of the temp sweep (#38) 2026-10-01 18:10:49 -04:00
state.test.js feat(defenseurs): serve the Sergent's findings state at GET /defenseurs/state 2026-09-24 20:42:20 -04:00
writes.test.js test: cover degraded paths and shell commands in the write guard (#36) 2026-09-30 19:59:44 -04:00