spawn/test
A 0f3ca5e052
refactor: reduce complexity in test/mock.sh and test/record.sh (#1102)
Extracted helper functions to reduce cyclomatic complexity:

test/mock.sh:
- Extract _wait_with_timeout() from run_script_with_timeout() (reduced from 32→17 lines)
- Extract _setup_test_env() and _record_categorized_result() from run_test() (reduced from 50→26 lines)

test/record.sh:
- Refactor has_api_error() to use lambda dict for cloud-specific checks (improved readability, same logic)
- Extract _format_env_var_display() from list_clouds() to eliminate nested loop (reduced from 48→32 lines)

All functions maintain identical behavior and pass syntax validation.

Co-authored-by: Spawn Refactor Service <refactor@spawn.service>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-14 10:43:19 -05:00
..
fixtures feat: add Gcore cloud provider with 3 agent scripts (#1079) 2026-02-14 00:19:25 -08:00
mock.sh refactor: reduce complexity in test/mock.sh and test/record.sh (#1102) 2026-02-14 10:43:19 -05:00
qa-dry-run.sh feat: qa bot and emails (#565) 2026-02-11 20:19:45 -08:00
record.sh refactor: reduce complexity in test/mock.sh and test/record.sh (#1102) 2026-02-14 10:43:19 -05:00
run.sh fix(security): harden weak crypto fallbacks, key validation, and temp paths (#1039) 2026-02-13 21:43:37 -05:00
update-readme.py QA-Bot setup (#335) 2026-02-10 19:51:07 -08:00