diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 0f685d2..0000000 --- a/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "tests/storage/servers/owncloud"] - path = tests/storage/servers/owncloud - url = https://github.com/vdirsyncer/owncloud-testserver -[submodule "tests/storage/servers/nextcloud"] - path = tests/storage/servers/nextcloud - url = https://github.com/vdirsyncer/nextcloud-testserver diff --git a/Makefile b/Makefile index 6f7b7a1..4ca8f2b 100644 --- a/Makefile +++ b/Makefile @@ -63,9 +63,6 @@ all: install-servers: set -ex; \ for server in $(DAV_SERVER); do \ - if [ ! "$$(ls $(TESTSERVER_BASE)$$server/)" ]; then \ - git submodule update --init -- "$(TESTSERVER_BASE)$$server"; \ - fi; \ (cd $(TESTSERVER_BASE)$$server && sh install.sh); \ done diff --git a/docker/radicale/Dockerfile b/docker/radicale/Dockerfile deleted file mode 100644 index 462c5e2..0000000 --- a/docker/radicale/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM python:3.8 - -RUN pip install radicale - -CMD radicale --storage-filesystem-folder /tmp/dav -H 0.0.0.0:8001 -D diff --git a/docker/xandikos/Dockerfile b/docker/xandikos/Dockerfile deleted file mode 100644 index 464450c..0000000 --- a/docker/xandikos/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -# Original file copyright 2017 Jelmer Vernooij - -FROM ubuntu:bionic -RUN apt-get update && apt-get -y install xandikos locales -EXPOSE 8000 - -RUN locale-gen en_US.UTF-8 -ENV PYTHONIOENCODING=utf-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 - -CMD xandikos -d /tmp/dav -l 0.0.0.0 -p 8000 --autocreate diff --git a/tests/storage/servers/nextcloud b/tests/storage/servers/nextcloud deleted file mode 160000 index a27144d..0000000 --- a/tests/storage/servers/nextcloud +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a27144ddcf39a3283179a4f7ce1ab22b2e810205 diff --git a/tests/storage/servers/owncloud b/tests/storage/servers/owncloud deleted file mode 160000 index bb4fcc6..0000000 --- a/tests/storage/servers/owncloud +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bb4fcc6f524467d58c95f1dcec8470fdfcd65adf diff --git a/tests/storage/servers/radicale/install.sh b/tests/storage/servers/radicale/install.sh index 690c9f3..fdeaff9 100644 --- a/tests/storage/servers/radicale/install.sh +++ b/tests/storage/servers/radicale/install.sh @@ -1,6 +1,3 @@ #!/bin/sh -cd $(git rev-parse --show-toplevel) - -docker build -t radicale docker/radicale -docker run -d -p 8001:8001 radicale +docker run -d -p 8001:8001 whynothugo/vdirsyncer-devkit-radicale diff --git a/tests/storage/servers/xandikos/install.sh b/tests/storage/servers/xandikos/install.sh index ff322b9..aa7b089 100644 --- a/tests/storage/servers/xandikos/install.sh +++ b/tests/storage/servers/xandikos/install.sh @@ -1,6 +1,3 @@ #!/bin/sh -cd $(git rev-parse --show-toplevel) - -docker build -t xandikos docker/xandikos -docker run -d -p 8000:8000 xandikos +docker run -d -p 8000:8000 whynothugo/vdirsyncer-devkit-xandikos diff --git a/tests/storage/test_filesystem.py b/tests/storage/test_filesystem.py index f85c1f3..d14999c 100644 --- a/tests/storage/test_filesystem.py +++ b/tests/storage/test_filesystem.py @@ -46,38 +46,40 @@ class TestFilesystemStorage(StorageTests): def test_ignore_tmp_files(self, tmpdir): """Test that files with .tmp suffix beside .ics files are ignored.""" - s = self.storage_class(str(tmpdir), '.ics') - s.upload(Item('UID:xyzxyz')) - item_file, = tmpdir.listdir() - item_file.copy(item_file.new(ext='tmp')) + s = self.storage_class(str(tmpdir), ".ics") + s.upload(Item("UID:xyzxyz")) + (item_file,) = tmpdir.listdir() + item_file.copy(item_file.new(ext="tmp")) assert len(tmpdir.listdir()) == 2 assert len(list(s.list())) == 1 def test_ignore_tmp_files_empty_fileext(self, tmpdir): """Test that files with .tmp suffix are ignored with empty fileext.""" - s = self.storage_class(str(tmpdir), '') - s.upload(Item('UID:xyzxyz')) - item_file, = tmpdir.listdir() - item_file.copy(item_file.new(ext='tmp')) + s = self.storage_class(str(tmpdir), "") + s.upload(Item("UID:xyzxyz")) + (item_file,) = tmpdir.listdir() + item_file.copy(item_file.new(ext="tmp")) assert len(tmpdir.listdir()) == 2 # assert False, tmpdir.listdir() # enable to see the created filename assert len(list(s.list())) == 1 def test_ignore_files_typical_backup(self, tmpdir): """Test file-name ignorance with typical backup ending ~.""" - ignorext = "~" # without dot - s = self.storage_class(str(tmpdir), '', fileignoreext="~") - s.upload(Item('UID:xyzxyz')) - item_file, = tmpdir.listdir() - item_file.copy(item_file.new(basename=item_file.basename+'~')) + ignorext = "~" # without dot + + storage = self.storage_class(str(tmpdir), "", fileignoreext=ignorext) + storage.upload(Item("UID:xyzxyz")) + (item_file,) = tmpdir.listdir() + item_file.copy(item_file.new(basename=item_file.basename + ignorext)) + assert len(tmpdir.listdir()) == 2 - #assert False, tmpdir.listdir() # enable to see the created filename - assert len(list(s.list())) == 1 + assert len(list(storage.list())) == 1 def test_too_long_uid(self, tmpdir): - s = self.storage_class(str(tmpdir), ".txt") + storage = self.storage_class(str(tmpdir), ".txt") item = Item("UID:" + "hue" * 600) - href, etag = s.upload(item) + + href, etag = storage.upload(item) assert item.uid not in href def test_post_hook_inactive(self, tmpdir, monkeypatch):