spawn/cli/src
A 30c61aa809
test: add 66 tests for ensure_api_token_with_provider credential flow (#729)
Add comprehensive test coverage for the single-token credential management
functions in shared/common.sh that previously had zero test coverage:
- _load_token_from_env (env var detection, edge cases)
- _load_token_from_config (JSON config loading, error handling)
- _validate_token_with_provider (validation callback, env var cleanup)
- _save_token_to_config (secure file creation, JSON escaping, roundtrips)
- ensure_api_token_with_provider (full flow integration tests)

These functions are used by every single-token cloud provider (Hetzner,
DigitalOcean, Vultr, Lambda, Linode, etc.) and are security-critical
for credential handling.

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-12 15:01:03 -08:00
..
__tests__ test: add 66 tests for ensure_api_token_with_provider credential flow (#729) 2026-02-12 15:01:03 -08:00
commands.ts fix: restore --prompt in retry command after script failure (#731) 2026-02-12 15:00:46 -08:00
history.ts fix: improve CLI UX for list filters, dry-run URLs, history, and matrix display (#537) 2026-02-11 14:59:31 -08:00
index.ts fix: improve spawn list UX with positional filters and long flags (#549) 2026-02-11 15:46:39 -08:00
manifest.ts fix: improve spawn list UX with positional filters and long flags (#549) 2026-02-11 15:46:39 -08:00
security.ts fix: improve error messages with actionable guidance (#447) 2026-02-11 05:20:31 -08:00
unicode-detect.ts fix: Switch build target from node to bun to fix UTF-8 mojibake 2026-02-10 09:36:28 +00:00
update-check.ts fix: improve user-facing messages and error text across CLI and shell scripts (#464) 2026-02-11 07:26:00 -08:00