Skip to content

Conversation

@vanpelt
Copy link
Collaborator

@vanpelt vanpelt commented Jul 25, 2025

No description provided.

vanpelt and others added 2 commits July 24, 2025 13:46
- Add Docker-based integration test environment with mocked external services
- Create mock scripts for claude, gh, and git commands to isolate tests
- Add test coverage for worktree operations, Claude sessions, PR workflows
- Refactor handlers to use RegisterRoutes pattern for cleaner organization
- Include test data management and debugging tools for development

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Major improvements to the integration testing architecture:

**New Architecture:**
- Test container runs Catnip server on port 8181 with hot reloading via Air
- Integration tests run from host machine making real HTTP calls
- Mock scripts and test data baked into Docker image with proper PATH
- Container persists between test runs for faster execution

**Key Features:**
- Self-contained: Mocks/data included in image, works without volume mounts
- Development-friendly: Optional volume mounts for iterating on mocks/data
- Fast builds: BuildKit cache mounts for Go dependencies
- Hot reloading: Server code changes reflected immediately via Air
- Port isolation: Test server on 8181 avoids conflicts with dev server on 8080

**Performance Improvements:**
- Container stays running between test runs (no startup delay)
- BuildKit with cache mounts for faster Go builds
- Real HTTP testing eliminates in-memory test setup overhead

**Commands:**
- `./run_integration_tests.sh start` - Start persistent test container
- `./run_integration_tests.sh test` - Run tests (container stays running)
- `./run_integration_tests.sh status` - Check container status
- `./run_integration_tests.sh clean` - Cleanup when needed

Fixes issue where git commands were trying to contact GitHub by ensuring
mock scripts are properly mounted and prioritized in PATH.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants