Repository navigation
test: merge all test-server config sources - #820
Merged
Merged
Conversation
load_test_server_config() stopped at the first source found, so a test-server yaml hid the test_allowed sections of the caldav config. It now returns the union, earlier sources winning on a name clash. The checkout's tests/caldav_test_servers.yaml is found relative to the module rather than the current directory, and ExternalTestServer.is_accessible() does a TCP probe instead of always returning True. #817 Prompt: Fix #817 Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
tobixen
added a commit
that referenced
this pull request
Oct 24, 2026
The caldav source code has rather a lot of testing logic, including allowing ordinary configuration files to enable testing towards the configured servers, allowing special test server configuration files to be read, and also start/stop-scripts that can instantiate docker test servers if docker or podman is installed. There is a legitimate need for testing other packages (like plann, calendar-cli, calendaring, calendaring-sync) towards a wide range of test servers, hence we're bringing the test server registry logic out as a public part of the package. Arguably it would better belong in a separate package (or in the caldav-server-tester package). As for now the costs of spawning Yet Another Package have been considered bigger than the costs of adding some few kilobytes of pure-Python logic that ordinary users of the caldav package do not need - but this may be considered in the future - filed as #823 The registry, config loader, locks and the embedded, Docker and external server classes moved from tests/test_servers into the installed caldav.testing package, so other projects can use them without a source checkout. tests/test_servers re-exports them, with each submodule aliased to its new home so existing imports and monkeypatching keep working. The docker-compose files stay in the repository; CALDAV_DOCKER_TEST_SERVERS_DIR names them when caldav is installed rather than checked out. get_davclient() on a test server now uses that registry on an installed caldav too, in place of the embedded-plus-test_allowed fallback; a config file named explicitly or through CALDAV_CONFIG_FILE still adds its test_allowed sections. #817 Prompt: The other session reports that #817, closed by #820, has only been partially done. Please investigate [#817: move the test-server registry into the installed caldav.testing; #820 merged only the follow-up comment] Followup-Prompt: Please just start working on a new PR instead [rather than commenting on #817] Prompts (comments made inline in the document while reviewing it): > (on this commit message, after rewriting its first paragraphs) Please do another QA of my editing here Assisted-By: Claude Sonnet 5.5 <noreply@anthropic.com> Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Commit message:
Fixes #817
🤖 Generated with Claude Code