CluPilotCloud/tests/Feature/Readiness
nexxo c81a89ce5a A failed zone list is not an empty Hetzner account
The owner asked whether an empty token was being sent. It was not — an empty one
returns `missing` — but the question was worth following, and it found a fault
in the message I had just added.

The check classified 401 and 403 as `rejected` and then read the body. Every
OTHER unsuccessful response — 404, 429, 500, a cache's status page — has no
`zones` key, `?? []` turned that into no zones, and the console then stated "this
account holds no zones at all. The token probably belongs to a different Hetzner
project." A claim about somebody's account, derived from an error nobody looked
at, delivered with more confidence than the working case gets.

`successful()` is asked first now, and an unexpected status is reported as what
it is, with the number beside it: it says nothing about the zones, and it says
so. That is the distinction this check already draws between `unreachable` and
`read_only` — both are failures, only one of them tells you anything about the
token.

A genuinely empty list still means what it meant: 200 with zero zones is a token
for a project without zones.

The test uses a dataset rather than a loop. Http::fake() ADDS stubs instead of
replacing them, so a loop would have had the first status answer all four
iterations and the test would have proved one case three times over.

2050 tests pass, assets build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 15:36:47 +02:00
..
ActiveChecksTest.php A failed zone list is not an empty Hetzner account 2026-07-31 15:36:47 +02:00
BillingChecksTest.php Never tell anyone to delete a catalogue their contracts bill on 2026-07-30 17:30:56 +02:00
DeliveryChecksTest.php Put every missing field on one page before a customer pays 2026-07-30 15:59:34 +02:00
HeartbeatTest.php Fix round: guard the parse, bound the future, name the real tab 2026-07-30 14:49:06 +02:00
OnboardingChecksTest.php Put every missing field on one page before a customer pays 2026-07-30 15:59:34 +02:00
ProvisioningChecksTest.php Fix round: read the mailer against NON_DELIVERING, not against 'log' alone 2026-07-30 13:27:14 +02:00