Files
zeekayandHanzo Dev 1c8c43c478 test: make the integration suite hermetic and deterministic
Two ways this suite's verdict was not about this code.

A THIRD PARTY decided one spec. Both backends of /show/{id} were
http://showrss.info/ — someone else's site, over plaintext HTTP — so `rss` (the
only coverage of the rss decoder composed with `group` + `allow`) passed or
failed on whether that host was up and unchanged. It is served by the harness's
own mock now, which is what every other spec already does; the coverage is
unchanged and the third party is gone. Runtime for the case went 0.65s -> 0.00s.

A SLEEP decided the rest. waitForStartup fell back to sleeping a fixed 1.5s
because gateway_ready_url defaulted to empty — the readiness probe was already
written and simply switched off. On a loaded machine the gateway had not bound
:8080 by then and EVERY spec failed with `connection refused`: ~60 red subtests,
one cause, none of them real. Observed here 1 run in 4 before the change, 0 in 7
after. The probe now defaults to the gateway's own /healthz with a 30s CEILING —
it returns the moment the probe answers 200, so a fast machine pays nothing.

waitForReady's "is ready" line moves to stderr: it is progress, not program
output, and ExampleNewIntegration asserts on the harness's STDOUT — printing a
true statement there failed the example.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-28 22:53:42 -07:00

17 lines
751 B
JSON

{
"@comment": "The `rss` decoder composed with `group` + `allow`: two RSS backends fan out in parallel, each namespaced under its group, each stripped to the one allowed field. Both are now the harness's OWN mock (integration.go rssEndpoint). They used to be http://showrss.info/ over plaintext HTTP, which made this suite's verdict depend on a third party nobody here operates.",
"in": {
"method": "GET",
"url": "http://localhost:8080/show/1482"
},
"out": {
"status_code": 200,
"body": "{\"available\":{\"title\":\"personal feed\"},\"schedule\":{\"title\":\"schedule feed\"}}",
"header": {
"content-type": ["application/json; charset=utf-8"],
"Cache-Control": ["public, max-age=3600"],
"X-Gateway-Completed": ["true"]
}
}
}