fix(clients): hermetic tests ignore .env.json.local unless MOLO_LIVE_NET is set

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 04:46:35 +02:00
co-authored by Claude Sonnet 5.5
parent 5a54982339
commit d92baa5de5
4 changed files with 10 additions and 2 deletions
+3
View File
@@ -58,6 +58,9 @@ client, credentials, errors, or caps.
APIs that refuse keys) use the same seam: `Credentials::bearer`; a
`GOOGLE_ACCESS_TOKEN` (same lookup order) takes precedence over a key.
Tokens expire after about an hour; refresh is the caller's job (gap).
- Test runs set `MOLO_ENV_FILES=off`: config files are ignored so a developer's
`.env.json.local` cannot change test outcomes. `MOLO_LIVE_NET=1` re-enables
them for the opt-in live checks.
- No key: `configured()` is false and every call throws `NotConfiguredError`
(HTTP 503, status `NOT_CONFIGURED`) before any network traffic. Loud, not
silent.