-
Notifications
You must be signed in to change notification settings - Fork 108
Add Baikal Docker test server framework for CI/CD #573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f20cf30 to
1fd96c6
Compare
|
Hey @tobixen, this is a great addition - I've been using a similar pattern in https://github.com/cbcoutinho/nextcloud-mcp-server for integration testing. Would you be willing to add Nextcloud or Radicale as well for multi-CalDav server testing? I haven't added my docker-compose to #565 to keep the PR focused on |
|
Yes, if I can get baikal working, then I will be looking into adding other docker-based calendar servers. Radicale is not on the list. Radicale and Xandikos is already included in the standard test suite, since they are python-based I was able to launch an instance from the test code without involving docker, so the tests are already running towards radicale regularly. |
Set up infrastructure for running tests against Baikal CalDAV server in Docker containers, both locally and in GitHub Actions. Changes: - Added Baikal service container to GitHub Actions workflow - Created docker-compose setup under tests/docker-test-servers/baikal/ - Added Baikal configuration module (tests/conf_baikal.py) - Created comprehensive documentation and helper scripts - Updated .gitignore to exclude backup directories - Added tests/README.md with testing guide The GitHub Actions workflow now automatically spins up a Baikal container and makes it available at http://localhost:8800 for testing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Configure tests to automatically detect and use Baikal CalDAV server when BAIKAL_URL environment variable is set (as in GitHub Actions). Changes: - Added test_baikal flag (auto-enabled when BAIKAL_URL is set) - Added baikal_host and baikal_port configuration - Added Baikal server to caldav_servers list if accessible - Uses compatibility_hints.baikal for known quirks - Checks if Baikal is accessible before adding to test servers Tests will now run against the Baikal Docker container in CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Configure tox to pass BAIKAL_URL, BAIKAL_USERNAME, and BAIKAL_PASSWORD environment variables to the test environment. Without this, the environment variables set in GitHub Actions were not reaching the tests. This enables the test suite to detect and use the Baikal container in CI/CD pipelines. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Configure GitHub Actions to run tests on only the minimum and maximum supported Python versions (3.9 and 3.14) for pull requests, while still testing all versions (3.9-3.14) on pushes to master. This reduces CI time and resource usage for PRs while maintaining full coverage on the main branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Create a fully pre-configured Baikal instance that starts ready-to-use without manual setup, enabling true automated testing in CI/CD. Changes: - Added pre-configured SQLite database with testuser/testpass - Added Baikal config.php and config.system.php files - Created create_baikal_db.py script to regenerate configuration - Updated start.sh to copy config into container after startup - Updated docker-compose.yml to use named volume - Updated GitHub Actions workflow to copy config into container - Updated documentation to use start.sh The Baikal container now starts immediately configured with: - Admin: admin / admin - Test user: testuser / testpass - Default calendar and addressbook already created - Digest authentication enabled Local usage: cd tests/docker-test-servers/baikal && ./start.sh Tests will now run successfully against Baikal in CI/CD. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit implements a complete automated testing framework for Baikal CalDAV server using Docker containers. The setup works seamlessly in both local development and CI/CD environments. Key changes: 1. **Automated container management** (tests/conf.py) - Auto-detects docker-compose availability - Starts Baikal container automatically when tests run - Handles setup/teardown lifecycle - Auto-appends /dav.php to base URL for correct CalDAV endpoint 2. **Updated database schema** (tests/docker-test-servers/baikal/create_baikal_db.py) - Uses official Baikal 0.10.1 SQLite schema - Creates all required tables (groupmembers, calendarinstances, etc.) - Properly initializes test user with digest authentication - Sets configured_version to match Docker image (0.10.1) 3. **YAML configuration support** (tests/docker-test-servers/baikal/config/baikal.yaml) - Added baikal.yaml config for Baikal 0.7.0+ compatibility - Configures system settings and database path - Enables CalDAV and CardDAV with Digest auth 4. **Improved Docker workflow** (.github/workflows/tests.yaml) - Added permission fixes for SQLite database - Copies both Specific and config directories - Ensures proper file ownership in container 5. **Graceful degradation** (tests/conf.py) - Skips Baikal tests if Docker not available - Provides clear error messages when misconfigured - Works on systems without Docker installed 6. **Updated compatibility hints** (caldav/compatibility_hints.py) - Verified compatibility with Baikal 0.10.1 - Removed obsolete quirks no longer needed - Preserved old quirks for reference 7. **Documentation updates** (tests/docker-test-servers/baikal/README.md) - Added automatic setup instructions - Documented URL handling (/dav.php auto-append) - Explained Docker requirement and graceful skip behavior The framework now supports fully automated testing against Baikal without any manual configuration. Tests automatically start the container if needed, or skip gracefully if Docker is unavailable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
e69a622 to
befbf61
Compare
Documents the new automated Baikal testing framework in the Unreleased section, including all key features and capabilities. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
This was a hard nut to crack, I'm happy that I could outsource it to the AI. It was having a really hard time getting the baikal server set up, oscillating between trying to mount some directory pre-seeded with configuration versus copying the configuration into the server after startup. All the time baikal just wanted to redirect to an install script. |
Set up infrastructure for running tests against Baikal CalDAV server in Docker containers, both locally and in GitHub Actions.
Changes:
The GitHub Actions workflow now automatically spins up a Baikal container and makes it available at http://localhost:8800 for testing.
🤖 Generated with Claude Code