Dockerize nextcloud (#704)

* Dockerize nextcloud

* Remove ownCloud and baikal, fix #489

* Remove branch from travis conf
This commit is contained in:
Markus Unterwaditzer 2018-01-18 23:10:53 +01:00 committed by GitHub
parent 401c441acb
commit 41f64e2dca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 59 additions and 60 deletions

9
.gitmodules vendored
View file

@ -1,9 +0,0 @@
[submodule "tests/storage/servers/baikal"]
path = tests/storage/servers/baikal
url = https://github.com/vdirsyncer/baikal-testserver
[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

View file

@ -94,18 +94,10 @@
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=release ",
"python": "3.6"
},
{
"env": "BUILD=test DAV_SERVER=owncloud REQUIREMENTS=release ",
"python": "3.6"
},
{
"env": "BUILD=test DAV_SERVER=nextcloud REQUIREMENTS=release ",
"python": "3.6"
},
{
"env": "BUILD=test DAV_SERVER=baikal REQUIREMENTS=release ",
"python": "3.6"
},
{
"env": "BUILD=test DAV_SERVER=davical REQUIREMENTS=release ",
"if": "NOT (type IN (pull_request))",
@ -143,5 +135,8 @@
"script": [
"make -e $BUILD"
],
"services": [
"docker"
],
"sudo": true
}

View file

@ -14,6 +14,7 @@ Version 0.17.0
- Fix bug where collection discovery under DAV-storages would produce invalid
XML. See :gh:`688`.
- ownCloud and Baikal are no longer tested.
Version 0.16.3
==============

View file

@ -1,10 +0,0 @@
======
Baikal
======
Vdirsyncer is continuously tested against the latest version of Baikal_.
- Baikal up to ``0.2.7`` also uses an old version of SabreDAV, with the same
issue as ownCloud, see :gh:`160`. This issue is fixed in later versions.
.. _Baikal: http://baikal-server.com/

View file

@ -52,12 +52,10 @@ Servers
.. toctree::
:maxdepth: 1
baikal
davmail
fastmail
google
icloud
nextcloud
owncloud
radicale
xandikos

View file

@ -1,26 +0,0 @@
.. _owncloud_setup:
========
ownCloud
========
Vdirsyncer is continuously tested against the latest version of ownCloud_::
[storage cal]
type = "caldav"
url = "https://example.com/remote.php/dav/"
username = ...
password = ...
[storage card]
type = "carddav"
url = "https://example.com/remote.php/dav/"
username = ...
password = ...
- *Versions older than 7.0.0:* ownCloud uses SabreDAV, which had problems
detecting collisions and race-conditions. The problems were reported and are
fixed in SabreDAV's repo, and the corresponding fix is also in ownCloud since
7.0.0. See :gh:`16` for more information.
.. _ownCloud: https://owncloud.org/

View file

@ -8,6 +8,7 @@ latest_python = "3.6"
cfg = {}
cfg['sudo'] = True
cfg['services'] = ['docker']
cfg['dist'] = 'trusty'
cfg['language'] = 'python'
cfg['cache'] = {
@ -49,8 +50,7 @@ for python, requirements in itertools.product(python_versions,
dav_servers = ("radicale", "xandikos")
if python == latest_python and requirements == "release":
dav_servers += ("owncloud", "nextcloud", "baikal", "davical", "icloud",
"fastmail")
dav_servers += ("nextcloud", "davical", "icloud", "fastmail")
for dav_server in dav_servers:
job = {

11
tests/docker-compose.yml Normal file
View file

@ -0,0 +1,11 @@
version: '2'
services:
nextcloud:
image: nextcloud
ports:
- '8080:80'
environment:
- SQLITE_DATABASE=nextcloud
- NEXTCLOUD_ADMIN_USER=asdf
- NEXTCLOUD_ADMIN_PASSWORD=asdf

@ -1 +0,0 @@
Subproject commit 6c8c379f1ee8bf4ab0ac54fc4eec3e4a6349c237

@ -1 +0,0 @@
Subproject commit 1427b0e8d6cf89c5876bce2dece3248822a2c147

View file

@ -0,0 +1,41 @@
import requests
import pytest
def is_responsive(url):
try:
requests.get(url)
return True
except Exception:
return False
class ServerMixin(object):
storage_class = None
wsgi_teardown = None
@pytest.fixture(scope='session')
def nextcloud_server(self, docker_ip, docker_services):
url = 'http://{}:{}'.format(docker_ip,
docker_services.port_for('nextcloud', 80))
docker_services.wait_until_responsive(
timeout=30.0, pause=0.1,
check=lambda: is_responsive(url)
)
return url
@pytest.fixture
def get_storage_args(self, nextcloud_server, item_type,
slow_create_collection):
def inner(collection='test'):
args = {
'username': 'asdf',
'password': 'asdf',
'url': nextcloud_server + '/remote.php/dav/'
}
if collection is not None:
args = slow_create_collection(self.storage_class, args,
collection)
return args
return inner

View file

@ -0,0 +1 @@
pip install pytest-docker

@ -1 +0,0 @@
Subproject commit d3cfc453b0b2dded90c870fd23281fb0c13d766f