Skip to content

test: merge all test-server config sources - #820

Merged
tobixen merged 1 commit into
masterfrom
test/config-sources-union
Oct 24, 2026
Merged

tobixen merged 1 commit into
masterfrom
test/config-sources-union

Conversation

@tobixen

@tobixen tobixen commented Oct 24, 2026

Copy link
Copy Markdown
Member

Commit message:

test: merge all test-server config sources

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.

https://github.com/python-caldav/caldav/issues/817

Prompt: Fix #817

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Fixes #817

🤖 Generated with Claude Code

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
tobixen merged commit 70656cf into master Oct 24, 2026
17 checks passed
@tobixen
tobixen deleted the test/config-sources-union branch October 24, 2026 12:18
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>
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.

Ship the test-server registry and the docker server classes in caldav.testing

1 participant