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

Chiusa
#817 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #820 di @tobixen — integrata

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
docker, python
Ambito
testing

Direzione di ricerca

Start by reading caldav.testing and tests/test_servers/ to map the registry, config loader, session locks, and Docker server classes listed in the issue. Then trace how server classes locate docker-test-servers/ and how the existing tests import them. Done means the reusable framework is shipped in caldav.testing, with tests/test_servers re-exporting it and the location of the compose directory resolved.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Disclaimer: AI-generated text below the line, generated by Claude Opus 5.5.


caldav.testing ships the embedded Xandikos and Radicale servers, so other projects can run their tests against them. The rest of the test-server framework is in tests/test_servers/, which is not in the wheel:

  • ServerRegistry, get_available_servers() and the config loader;
  • DockerTestServer and the classes for Baikal, Nextcloud, Cyrus, SOGo and the others;
  • the per-server session locks.

calendaring runs its CalDAV conformance suite on caldav's docker servers (pytest --caldav-servers=Baikal,...). To do so, it loads tests/test_servers by path from a caldav source checkout, under another package name. That works on a laptop, but it has two problems:

  • it breaks whenever caldav's tests are refactored;
  • a CI job has to check out caldav's repository at a matching version, beside the installed package.

Proposal: move the registry, the config loader, the locks and the docker server classes into caldav.testing (or a caldav.testing subpackage), and keep tests/test_servers as a thin re-export so caldav's own tests do not change. The docker-compose files can stay in the repository. A consumer starts the servers from a checkout or as CI service containers, and only needs the classes to find them and know their URLs, credentials and compatibility hints.

Things to settle:

  • Where the docker-test-servers/ directory is found. Today it is found relative to the module, which stops working once the module lives in an installed package. One option is an environment variable, or a config key, naming the checkout. Another is for a shipped class to probe only its URL (is_accessible()) and never try to start anything.
  • No rush. This can wait for a release after 3.6.0; calendaring's path import works locally in the meantime.
Lingua principale
Python
Stelle
412
Fork
113
Merge medio
9h 21m
PR unite (30g)
77

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python-caldav/caldav

Tutte le issue di python-caldav/caldav

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.