fix(doctor): fail -o json on a failed check and name each product in its hints (#52)

* fix(doctor): fail -o json on a failed check and name each product in its hints

doctor -o json now exits 1 when a check fails, as text output does; hints and HTTP errors name the product's own command (floci gcp start, ...) and the port check falls back to the product's default port; a warnings-only run no longer reads as '0 issue(s) found'; an https AWS_ENDPOINT_URL without a port means 443.

* fix(http): name the product's status command when a request times out

Both ways a request can time out now give the same message with the product's own command. The hint tests use their own local endpoints instead of port 9.
This commit is contained in:
Hector Ventura authored and GitHub committed 2026-10-10 18:45:05 -05:00
1 parent 4cd39a957a
commit 771b353733
20 files changed
+266 -35

No files matched your search

@@ -90,7 +90,7 @@ public class WaitCommand implements Callable<Integer> {
// The deadline starts now, so the container lookup below counts against --timeout too.
Instant deadline = Instant.now().plusMillis(timeoutMillis);
String effectiveEndpoint = knownEndpoint != null ? knownEndpoint : endpointWithin(deadline);
FlociHttpClient client = new FlociHttpClient(effectiveEndpoint, profile.controlPrefix());
FlociHttpClient client = new FlociHttpClient(effectiveEndpoint, profile);
// Poll soon after a start, then back off; never let a request or a pause run past the
// deadline, so --timeout is a real upper bound.