Skip to content

Conversation

@ashwin-ant
Copy link
Collaborator

Summary

  • Add Dockerfile.test: Python 3.12 image with Claude Code CLI installed
  • Add scripts/test-docker.sh: Local script to run tests in Docker
  • Add test-e2e-docker job to CI workflow that runs the full e2e suite in a container
  • Add .dockerignore to speed up Docker builds

Context

This helps catch Docker-specific issues like #406 where filesystem-based agents loaded via setting_sources=["project"] may silently fail in Docker environments.

Local Usage

# Run unit tests in Docker (no API key needed)
./scripts/test-docker.sh unit

# Run e2e tests in Docker
ANTHROPIC_API_KEY=sk-... ./scripts/test-docker.sh e2e

# Run all tests
ANTHROPIC_API_KEY=sk-... ./scripts/test-docker.sh all

Test plan

  • Unit tests pass in Docker locally (129 passed)
  • CI job runs successfully

🤖 Generated with Claude Code

ashwin-ant and others added 2 commits December 16, 2025 09:35
Add test coverage for issue #406 where filesystem-based agents loaded
via setting_sources=["project"] may silently fail in Docker environments.

Changes:
- Add e2e test `test_filesystem_agent_loading` that verifies agents from
  .claude/agents/*.md are loaded and produce full responses
- Add example `examples/filesystem_agents.py` demonstrating filesystem agent usage
- Add test agent file `.claude/agents/test-agent.md` for the SDK repo

The test confirms this works correctly outside Docker, helping isolate
#406 as a Docker/bundled-CLI specific issue.

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

Co-Authored-By: Claude <[email protected]>
Add Docker test infrastructure to catch container-specific issues like #406
where filesystem-based agents may silently fail in Docker environments.

Changes:
- Add Dockerfile.test: Python 3.12 image with Claude Code CLI installed
- Add scripts/test-docker.sh: Local script to run tests in Docker
- Add test-e2e-docker job to CI workflow
- Add .dockerignore to speed up Docker builds

Usage:
  ./scripts/test-docker.sh unit    # Run unit tests in Docker
  ./scripts/test-docker.sh e2e     # Run e2e tests (needs ANTHROPIC_API_KEY)
  ./scripts/test-docker.sh all     # Run all tests

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

Co-Authored-By: Claude <[email protected]>
@ashwin-ant ashwin-ant force-pushed the add-docker-test-infrastructure branch from 49e923d to d8c0af9 Compare December 16, 2025 18:22
@ashwin-ant ashwin-ant requested a review from a team December 16, 2025 18:28
@ashwin-ant ashwin-ant merged commit a0ce44a into main Dec 16, 2025
28 checks passed
@ashwin-ant ashwin-ant deleted the add-docker-test-infrastructure branch December 16, 2025 18:53
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.

3 participants