test(go): step 6 — integration tests covering all exit codes and output
Extract run(args, stdout, stderr) int from main() for in-process testability. Fix TLS failure classification (tlsErr now captured from TLSHandshakeDone hook). Add run_test.go with 14 table-driven in-process tests and cli_test.go with TestMain + 3 subprocess smoke tests. All servers use httptest; .invalid TLD for deterministic DNS failures. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -95,6 +95,7 @@ https://example.com (5 samples)
|
||||
| 3 | Multiple URLs + `--count`/`-n` — min/avg/max aggregates | ✅ Done |
|
||||
| 4 | `--json` output flag | ✅ Done |
|
||||
| 5 | Failure handling — `--timeout`, `--fail`, distinct exit codes, partial timing | ✅ Done |
|
||||
| 6 | Integration tests — in-process matrix + subprocess smoke tests | ✅ Done |
|
||||
|
||||
### Python
|
||||
|
||||
|
||||
Reference in New Issue
Block a user