vps-health-api/__tests__
le king fu 2c7886dbfe
All checks were successful
CI / verification (pull_request) Successful in 28s
fix(test-curl): take the two ports from the environment (#46)
test-curl.sh booted its servers on 3099 and 3098, hardcoded, and
ci.test.js runs it whole on every `npm test`: two runs side by side got
in each other's way, at least one of them failing every time.

- TEST_CURL_PORT and TEST_CURL_NOINGEST_PORT choose the ports, 3099 and
  3098 staying the defaults. Names of their own rather than PORT, which
  a dev shell often exports already.
- BASE_URL and NOINGEST_URL are derived from the ports and no longer
  read from the environment: overridden alone, they sent every curl away
  from the servers the script had started.
- A value outside 1-65535 and two identical ports are refused up front,
  with the variable named.
- ci.test.js gives every case free ports of its own (freePorts() keeps
  its probes open together so they are distinct), and no case listens on
  3099 or 3098 any more. New cases: two passes at once, the four
  refusals, source pins on the defaults and on the derived URLs, and a
  first-try connection check that pins the `wait` of the trap, which the
  fixed ports used to pin by accident.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 21:41:37 -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): take the two ports from the environment (#46) 2026-10-01 21:41:37 -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(writes): count every write, drop the stack attribution (#40) 2026-10-01 20:01:09 -04:00