mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Dockerize nextcloud (#704)
* Dockerize nextcloud * Remove ownCloud and baikal, fix #489 * Remove branch from travis conf
This commit is contained in:
parent
401c441acb
commit
41f64e2dca
13 changed files with 59 additions and 60 deletions
9
.gitmodules
vendored
9
.gitmodules
vendored
|
|
@ -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
|
|
||||||
11
.travis.yml
11
.travis.yml
|
|
@ -94,18 +94,10 @@
|
||||||
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=release ",
|
"env": "BUILD=test DAV_SERVER=xandikos REQUIREMENTS=release ",
|
||||||
"python": "3.6"
|
"python": "3.6"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"env": "BUILD=test DAV_SERVER=owncloud REQUIREMENTS=release ",
|
|
||||||
"python": "3.6"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"env": "BUILD=test DAV_SERVER=nextcloud REQUIREMENTS=release ",
|
"env": "BUILD=test DAV_SERVER=nextcloud REQUIREMENTS=release ",
|
||||||
"python": "3.6"
|
"python": "3.6"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"env": "BUILD=test DAV_SERVER=baikal REQUIREMENTS=release ",
|
|
||||||
"python": "3.6"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"env": "BUILD=test DAV_SERVER=davical REQUIREMENTS=release ",
|
"env": "BUILD=test DAV_SERVER=davical REQUIREMENTS=release ",
|
||||||
"if": "NOT (type IN (pull_request))",
|
"if": "NOT (type IN (pull_request))",
|
||||||
|
|
@ -143,5 +135,8 @@
|
||||||
"script": [
|
"script": [
|
||||||
"make -e $BUILD"
|
"make -e $BUILD"
|
||||||
],
|
],
|
||||||
|
"services": [
|
||||||
|
"docker"
|
||||||
|
],
|
||||||
"sudo": true
|
"sudo": true
|
||||||
}
|
}
|
||||||
|
|
@ -14,6 +14,7 @@ Version 0.17.0
|
||||||
|
|
||||||
- Fix bug where collection discovery under DAV-storages would produce invalid
|
- Fix bug where collection discovery under DAV-storages would produce invalid
|
||||||
XML. See :gh:`688`.
|
XML. See :gh:`688`.
|
||||||
|
- ownCloud and Baikal are no longer tested.
|
||||||
|
|
||||||
Version 0.16.3
|
Version 0.16.3
|
||||||
==============
|
==============
|
||||||
|
|
|
||||||
|
|
@ -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/
|
|
||||||
|
|
@ -52,12 +52,10 @@ Servers
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
baikal
|
|
||||||
davmail
|
davmail
|
||||||
fastmail
|
fastmail
|
||||||
google
|
google
|
||||||
icloud
|
icloud
|
||||||
nextcloud
|
nextcloud
|
||||||
owncloud
|
|
||||||
radicale
|
radicale
|
||||||
xandikos
|
xandikos
|
||||||
|
|
|
||||||
|
|
@ -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/
|
|
||||||
|
|
@ -8,6 +8,7 @@ latest_python = "3.6"
|
||||||
cfg = {}
|
cfg = {}
|
||||||
|
|
||||||
cfg['sudo'] = True
|
cfg['sudo'] = True
|
||||||
|
cfg['services'] = ['docker']
|
||||||
cfg['dist'] = 'trusty'
|
cfg['dist'] = 'trusty'
|
||||||
cfg['language'] = 'python'
|
cfg['language'] = 'python'
|
||||||
cfg['cache'] = {
|
cfg['cache'] = {
|
||||||
|
|
@ -49,8 +50,7 @@ for python, requirements in itertools.product(python_versions,
|
||||||
dav_servers = ("radicale", "xandikos")
|
dav_servers = ("radicale", "xandikos")
|
||||||
|
|
||||||
if python == latest_python and requirements == "release":
|
if python == latest_python and requirements == "release":
|
||||||
dav_servers += ("owncloud", "nextcloud", "baikal", "davical", "icloud",
|
dav_servers += ("nextcloud", "davical", "icloud", "fastmail")
|
||||||
"fastmail")
|
|
||||||
|
|
||||||
for dav_server in dav_servers:
|
for dav_server in dav_servers:
|
||||||
job = {
|
job = {
|
||||||
|
|
|
||||||
11
tests/docker-compose.yml
Normal file
11
tests/docker-compose.yml
Normal 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
|
|
||||||
41
tests/storage/servers/nextcloud/__init__.py
Normal file
41
tests/storage/servers/nextcloud/__init__.py
Normal 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
|
||||||
1
tests/storage/servers/nextcloud/install.sh
Normal file
1
tests/storage/servers/nextcloud/install.sh
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
pip install pytest-docker
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit d3cfc453b0b2dded90c870fd23281fb0c13d766f
|
|
||||||
Loading…
Reference in a new issue