diff --git a/.travis.yml b/.travis.yml index efdfe47..87a298c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,10 @@ "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel BUILD_PRS=true ", "python": "3.3" }, + { + "env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=devel BUILD_PRS=true ", + "python": "3.3" + }, { "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release BUILD_PRS=true ", "python": "3.3" @@ -37,6 +41,10 @@ "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel BUILD_PRS=true ", "python": "3.4" }, + { + "env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=devel BUILD_PRS=true ", + "python": "3.4" + }, { "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release BUILD_PRS=true ", "python": "3.4" @@ -49,6 +57,10 @@ "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel BUILD_PRS=true ", "python": "3.5" }, + { + "env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=devel BUILD_PRS=true ", + "python": "3.5" + }, { "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release BUILD_PRS=true ", "python": "3.5" @@ -62,7 +74,7 @@ "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=skip REQUIREMENTS=release BUILD_PRS=true ", + "env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=devel BUILD_PRS=true ", "python": "3.6" }, { @@ -101,6 +113,10 @@ "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel BUILD_PRS=true ", "python": "pypy3" }, + { + "env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=devel BUILD_PRS=true ", + "python": "pypy3" + }, { "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release BUILD_PRS=true ", "python": "pypy3" diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 332f34f..f7f18b0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,7 @@ Version 0.16.0 - Strip ``METHOD:PUBLISH`` added by some calendar providers. - Fix crash of Google storages when saving token file. - Make DAV discovery more RFC-conformant, see :ghpr:`585`. +- Vdirsyncer is now tested against Xandikos, see :ghpr:`601`. Version 0.15.0 ============== diff --git a/docs/supported.rst b/docs/supported.rst index 5fea998..02cb0db 100644 --- a/docs/supported.rst +++ b/docs/supported.rst @@ -69,7 +69,7 @@ Radicale_ is a very lightweight server, however, it intentionally doesn't implement the CalDAV and CardDAV standards completely, which might lead to issues even with very well-written clients. Apart from its non-conformity with standards, there are multiple other problems with its code quality and the way -it is maintained. +it is maintained. Consider using e.g. Xandikos_ instead. That said, vdirsyncer is continuously tested against the git version and the latest PyPI release of Radicale. @@ -252,3 +252,26 @@ tested frequently. You can use :storage:`google_contacts` and :storage:`google_calendar`. For more information see :gh:`202` and :gh:`8`. + +Xandikos +-------- + +Xandikos_ is a lightweight, yet complete CalDAV and CardDAV server, backed by +git. Vdirsyncer is continuously tested against its latest version. + +After running ``./bin/xandikos --defaults -d $HOME/dav``, you should be able to +point vdirsyncer against the root of Xandikos like this:: + + [storage cal] + type = "caldav" + url = "https://xandikos.example.com/" + username = ... + password = ... + + [storage card] + type = "carddav" + url = "https://xandikos.example.com/" + username = ... + password = ... + +.. _Xandikos: https://github.com/jelmer/xandikos diff --git a/scripts/make_travisconf.py b/scripts/make_travisconf.py index 61b80ff..34a0e7a 100644 --- a/scripts/make_travisconf.py +++ b/scripts/make_travisconf.py @@ -45,13 +45,13 @@ matrix.append({ for python, requirements in itertools.product(python_versions, ("devel", "release", "minimal")): + dav_servers = ("radicale",) + rs_servers = () if python == latest_python and requirements == "release": - dav_servers = ("skip", "radicale", "owncloud", "nextcloud", "baikal", - "davical", "icloud", "fastmail") - rs_servers = () - else: - dav_servers = ("radicale",) - rs_servers = () + dav_servers += ("owncloud", "nextcloud", "baikal", "davical", "icloud", + "fastmail") + elif requirements == "devel": + dav_servers += ("xandikos",) for server_type, server in itertools.chain( (("REMOTESTORAGE", x) for x in rs_servers), diff --git a/tests/storage/servers/xandikos/__init__.py b/tests/storage/servers/xandikos/__init__.py new file mode 100644 index 0000000..570d87f --- /dev/null +++ b/tests/storage/servers/xandikos/__init__.py @@ -0,0 +1,35 @@ +import pytest + +from xandikos.web import XandikosApp, XandikosBackend, WellknownRedirector + +import wsgi_intercept +import wsgi_intercept.requests_intercept + + +class ServerMixin(object): + @pytest.fixture + def get_storage_args(self, request, tmpdir, slow_create_collection): + tmpdir.mkdir('xandikos') + backend = XandikosBackend(path=str(tmpdir)) + cup = '/user/' + backend.create_principal(cup, create_defaults=True) + app = XandikosApp(backend, cup) + + app = WellknownRedirector(app, '/') + + wsgi_intercept.requests_intercept.install() + wsgi_intercept.add_wsgi_intercept('127.0.0.1', 8080, lambda: app) + + def teardown(): + wsgi_intercept.remove_wsgi_intercept('127.0.0.1', 8080) + wsgi_intercept.requests_intercept.uninstall() + request.addfinalizer(teardown) + + def inner(collection='test'): + url = 'http://127.0.0.1:8080/' + args = {'url': url, 'collection': collection} + + if collection is not None: + args = self.storage_class.create_collection(**args) + return args + return inner diff --git a/tests/storage/servers/xandikos/install.sh b/tests/storage/servers/xandikos/install.sh new file mode 100644 index 0000000..944b9ce --- /dev/null +++ b/tests/storage/servers/xandikos/install.sh @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +pip install wsgi_intercept + +if [ "$REQUIREMENTS" = "release" ] || [ "$REQUIREMENTS" = "minimal" ]; then + pip install -U xandikos +elif [ "$REQUIREMENTS" = "devel" ]; then + pip install -U git+https://jelmer.uk/code/xandikos/ +else + echo "Invalid REQUIREMENTS value" + false +fi