Skip to content

Remotestorage #265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,34 @@ env:
- BUILD=test
# Default build, see Makefile

- BUILD=test DAV_SERVER=radicale RADICALE_BACKEND=filesystem REQUIREMENTS=release
- BUILD=style
# flake8 with plugins

# REMOTESTORAGE TESTS

# - BUILD=test REMOTESTORAGE_SERVER=restore
# Testing against reStore
# https://github.com/jcoglan/restore/issues/38
# https://github.com/jcoglan/restore/issues/37

# DAV TESTS

- BUILD=test DAV_SERVER=radicale RADICALE_BACKEND=filesystem
# Radicale-release with filesystem storage

- BUILD=test DAV_SERVER=radicale RADICALE_BACKEND=filesystem
PKGS='lxml==3.0 requests==2.4.1 requests_toolbelt==0.4.0 click==5.0'
# Minimal requirements

- BUILD=test DAV_SERVER=radicale RADICALE_BACKEND=filesystem REQUIREMENTS=devel
# Radicale-git with filesystem storage (default)
# Radicale-git with filesystem storage

- BUILD=test DAV_SERVER=owncloud REQUIREMENTS=release
- BUILD=test DAV_SERVER=owncloud
# Latest ownCloud release

- BUILD=test DAV_SERVER=baikal REQUIREMENTS=release
- BUILD=test DAV_SERVER=baikal
# Latest Baikal release

- BUILD=style
# flake8 with plugins

install:
- "pip install -U pip"
- "pip install wheel"
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@
# If you want to skip the DAV tests against Radicale, use:
# make DAV_SERVER=skip # ...

export DAV_SERVER := radicale
export DAV_SERVER := skip
export REMOTESTORAGE_SERVER := skip
export RADICALE_BACKEND := filesystem
export REQUIREMENTS := release
export TESTSERVER_BASE := ./tests/storage/servers/
export TRAVIS := false

install-servers:
set -ex; \
for server in $(DAV_SERVER); do \
for server in $(DAV_SERVER) $(REMOTESTORAGE_SERVER); do \
if [ ! -d "$(TESTSERVER_BASE)$$server/" ]; then \
git clone --depth=1 \
https://github.com/vdirsyncer/$$server-testserver.git \
Expand Down
14 changes: 14 additions & 0 deletions docs/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,28 @@ These storages generally support reading and changing of their items. Their
default value for ``read_only`` is ``false``, but can be set to ``true`` if
wished.

CalDAV and CardDAV
++++++++++++++++++

.. autostorage:: vdirsyncer.storage.dav.CaldavStorage

.. autostorage:: vdirsyncer.storage.dav.CarddavStorage

remoteStorage
+++++++++++++

.. autostorage:: vdirsyncer.storage.remotestorage.RemoteStorageContacts

.. autostorage:: vdirsyncer.storage.remotestorage.RemoteStorageCalendars

Local
+++++

.. autostorage:: vdirsyncer.storage.filesystem.FilesystemStorage

.. autostorage:: vdirsyncer.storage.singlefile.SingleFileStorage


Read-only storages
~~~~~~~~~~~~~~~~~~

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
'click-log',
'click-threading',
'requests',
'requests-oauthlib',
'lxml>=3.0',
# https://github.com/sigmavirus24/requests-toolbelt/pull/28
'requests_toolbelt>=0.4.0',
Expand Down
35 changes: 35 additions & 0 deletions tests/storage/test_remotestorage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-


import os

import pytest

from vdirsyncer.storage.remotestorage import \
RemoteStorageCalendars, RemoteStorageContacts

from . import StorageTests, get_server_mixin

remotestorage_server = os.environ['REMOTESTORAGE_SERVER']
ServerMixin = get_server_mixin(remotestorage_server)


class RemoteStorageTests(ServerMixin, StorageTests):
remotestorage_server = remotestorage_server


class TestCalendars(RemoteStorageTests):
storage_class = RemoteStorageCalendars

@pytest.fixture(params=['VTODO', 'VEVENT'])
def item_type(self, request):
return request.param


class TestContacts(RemoteStorageTests):
storage_class = RemoteStorageContacts
supports_collections = False

@pytest.fixture(params=['VCARD'])
def item_type(self, request):
return request.param
4 changes: 4 additions & 0 deletions vdirsyncer/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ def __init__(self):
filesystem='vdirsyncer.storage.filesystem.FilesystemStorage',
http='vdirsyncer.storage.http.HttpStorage',
singlefile='vdirsyncer.storage.singlefile.SingleFileStorage',
remotestorage_contacts=(
'vdirsyncer.storage.remotestorage.RemoteStorageContacts'),
remotestorage_calendars=(
'vdirsyncer.storage.remotestorage.RemoteStorageCalendars'),
)

def __getitem__(self, name):
Expand Down
Loading