test(oauth-client): add discovery stage integration tests with fixtures and snapshots
Add comprehensive integration tests for the OAuth client discovery stage with
8 test cases covering:
1. https_confidential_happy_discovery - HTTPS with valid JSON metadata (AC1.1)
2. https_404_produces_network_error - HTTPS with 404 status (AC1.5)
3. https_unreachable_produces_network_error - HTTPS with transport error (AC1.5)
4. https_not_json_produces_spec_violation - HTTPS with invalid JSON (AC1.6)
5. loopback_root_produces_skip_rows - Loopback http://localhost (AC1.2, AC1.7)
6. loopback_with_port_produces_same_skip_rows - Loopback with port (AC1.7)
7. loopback_127_0_0_1 - IPv4 loopback (AC1.3)
8. https_happy_body_flow_into_facts - Direct discovery stage call for facts shape
Fixtures:
- tests/fixtures/oauth_client/discovery/https_confidential_happy/metadata.json
- tests/fixtures/oauth_client/discovery/https_404/.gitkeep
- tests/fixtures/oauth_client/discovery/https_not_json/not_json.txt
- tests/fixtures/oauth_client/discovery/loopback_root/.gitkeep
- tests/fixtures/oauth_client/discovery/loopback_with_path/.gitkeep
Snapshots:
Created and accepted 7 insta snapshots pinning the rendered report output for
each test case, verifying check IDs, status glyphs, and exit codes match
expectations for all discovery outcomes.
All tests pass with accepted snapshots.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.