fix(test-curl): take the two ports from the environment (#46) #47

Merged
maximus merged 3 commits from issue-46-test-curl-ports into main 2026-10-02 18:21:04 +00:00

3 commits

Author SHA1 Message Date
le king fu
67d40c83c3 test(ci): pin the two ends of the port range and the end anchor (#46)
All checks were successful
CI / verification (pull_request) Successful in 27s
CI / verification (push) Successful in 28s
Non-blocking points of the second review of PR #47: refusing 65535, and
dropping the end anchor of the pattern, both left the suite green.

- Ports 1 and 65535 must be accepted. Given to both variables at once,
  so the run stops on the "must differ" refusal, which comes after the
  range check, and nothing listens on a port fixed in advance.
- "80abc" must be refused, on each variable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 14:15:03 -04:00
le king fu
75ed6dd324 fix(test-curl): fix the two tokens, refuse bad ports on both variables (#46)
All checks were successful
CI / verification (pull_request) Successful in 27s
Non-blocking points of the review of PR #47.

- TOKEN and INGEST_TOKEN are no longer read from the environment, like
  the URLs: two inherited values that happened to be equal broke the
  compartmentalisation cases. Pinned in the proxy case, which now runs
  with one inherited value for both.
- The refusal cases run each bad value (not a number, 0, above 65535)
  on each of the two variables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 14:06:01 -04:00
le king fu
2c7886dbfe fix(test-curl): take the two ports from the environment (#46)
All checks were successful
CI / verification (pull_request) Successful in 28s
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