Add comprehensive integration tests for Phase 4 & 5 handlers#34
Merged
Conversation
Both test files were unskipped placeholder stubs — they referenced undefined symbols (load_spec, Orchestrator, RuntimeState.load, get_supabase) and contained no executable assertions. The handlers themselves (PlatformIdentityPhaseHandler and RegistriesPhaseHandler) were already fully implemented. The blockers were the tests that gated them as "not yet implemented". New test_phase4_platform.py (10 tests): - execute() populates identity_platform_output with all required keys - phase_completed["4"] set to True after execute - Keycloak container ID persisted to runtime_state - auth.platform.internal A record registered via DNSHandler - Bootstrap admin password generated / reused from state - TLS cert issued for auth.platform.internal via PKIHandler - Platform realm created via OIDCHandler - Realm/user/client IDs persisted to runtime_state New test_phase5_registries.py (11 tests): - execute() populates world_registry_output and domain_registry_output - Both outputs have all required keys - phase_completed["5"] set to True - WorldRegistryHandler.seed_from_spec called with spec - DomainRegistryHandler.seed_address_pools called with spec - WHOIS server registered with consumer_supervisor - dns_updates consumer registered with consumer_supervisor - NS + A zone records created for each configured TLD - TLD delegation data recorded in output Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YTMfjdVS2v1g6gyLbY1kA5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace placeholder integration tests for Phase 4 (Platform Identity) and Phase 5 (Registries) with comprehensive test suites that verify the
execute()behavior of their respective handlers using mocked external dependencies.Key Changes
Phase 4: Platform Identity Handler Tests
keycloak_container_id,platform_realm_id,admin_user_id,platform_client_id,deployed_at)patched_platform_depsfixture that mocks PKIHandler, DockerHandler, OIDCHandler, DNSHandler, and database migrationsPhase 5: Registries Handler Tests
seeded,deployed_at; domain registry:address_pools_seeded,tld_delegations,deployed_at)patched_registry_depsfixture that mocks WorldRegistryHandler, DomainRegistryHandler, WHOISServer, and DNSHandlerImplementation Details
unittest.mockfor dependency injection rather than integration with real servicesAsyncMockfor async handler methods and validate call arguments/countshttps://claude.ai/code/session_01YTMfjdVS2v1g6gyLbY1kA5