diff --git a/apps/dav/lib/server.php b/apps/dav/lib/server.php
index 44afcf23df6..587c0091e23 100644
--- a/apps/dav/lib/server.php
+++ b/apps/dav/lib/server.php
@@ -39,6 +39,7 @@ class Server {
$this->server->addPlugin(new \OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin('webdav', $logger));
$this->server->addPlugin(new \OCA\DAV\Connector\Sabre\LockPlugin());
$this->server->addPlugin(new \OCA\DAV\Connector\Sabre\ListenerPlugin($dispatcher));
+ $this->server->addPlugin(new \Sabre\DAV\Sync\Plugin());
// calendar plugins
$this->server->addPlugin(new \Sabre\CalDAV\Plugin());
diff --git a/apps/dav/tests/travis/caldavtest/config/serverinfo.xml b/apps/dav/tests/travis/caldavtest/config/serverinfo.xml
index b85a8639e4e..24d63d4a3ae 100644
--- a/apps/dav/tests/travis/caldavtest/config/serverinfo.xml
+++ b/apps/dav/tests/travis/caldavtest/config/serverinfo.xml
@@ -569,7 +569,7 @@
$addressbookhome%d:
- $addressbooks_uids:$userguid%d:
+ $addressbooks:$userid%d:
diff --git a/apps/dav/tests/travis/caldavtest/tests/CardDAV/sync-report.xml b/apps/dav/tests/travis/caldavtest/tests/CardDAV/sync-report.xml
new file mode 100644
index 00000000000..0321e61edbc
--- /dev/null
+++ b/apps/dav/tests/travis/caldavtest/tests/CardDAV/sync-report.xml
@@ -0,0 +1,1602 @@
+
+
+
+
+
+
+
+
+ carddav
+ sync-report
+
+
+
+
+ PUT
+ $addressbookpath1:/1.vcf
+
+ text/vcard; charset=utf-8
+ Resource/CardDAV/vreports/put/1.vcf
+
+
+
+ PUT
+ $addressbookpath1:/2.vcf
+
+ text/vcard; charset=utf-8
+ Resource/CardDAV/vreports/put/2.vcf
+
+
+
+
+
+
+ Not on addressbooks
+
+ PROPFIND
+ $addressbooks:/
+
+
+ text/xml; charset=utf-8
+ Resource/CardDAV/vreports/sync/1.xml
+
+
+ xmlElementMatch
+
+ notexists
+ $verify-property-prefix:/{DAV:}supported-report-set/{DAV:}supported-report/{DAV:}report/{DAV:}sync-collection
+
+
+
+ propfindItems
+
+ okprops
+ {DAV:}supported-report-set
+
+
+ badprops
+ {DAV:}sync-token
+
+
+
+
+
+
+ On addressbook
+
+ PROPFIND
+ $addressbookpath1:/
+
+
+ text/xml; charset=utf-8
+ Resource/CardDAV/vreports/sync/1.xml
+
+
+ xmlElementMatch
+
+ exists
+ $verify-property-prefix:/{DAV:}supported-report-set/{DAV:}supported-report/{DAV:}report/{DAV:}sync-collection
+
+
+
+
+
+ propfindItems
+
+ okprops
+ {DAV:}supported-report-set
+ {DAV:}sync-token
+
+
+
+
+
+
+
+
+ initial query - addressbook depth:1
+
+ REPORT
+ $addressbookpath1:/
+
+
+ text/xml; charset=utf-8
+ Resource/CardDAV/vreports/sync/2.xml
+
+
+ multistatusItems
+
+ okhrefs
+
+
+ 1.vcf
+ 2.vcf
+
+
+
+
+
+
+ add new resource
+
+ PUT
+ $addressbookpath1:/3.vcf
+
+ text/vcard; charset=utf-8
+ Resource/CardDAV/vreports/put/3.vcf
+
+
+ statusCode
+
+
+
+
+ new resource - addressbook depth:1
+
+ REPORT
+ $addressbookpath1:/
+
+
+ text/xml; charset=utf-8
+ Resource/CardDAV/vreports/sync/2.xml
+
+
+ multistatusItems
+
+ okhrefs
+
+
+ 1.vcf
+ 2.vcf
+ 3.vcf
+
+
+
+
+
+
+
+
+
+
+
+ DELETEALL
+ $addressbookhome1:/
+ $addressbookhome2:/
+ $notificationpath1:/
+ $notificationpath2:/
+
+
+
+
diff --git a/apps/dav/tests/travis/carddavtester.sh b/apps/dav/tests/travis/carddavtester.sh
index a128872f42a..fee4d0d74af 100644
--- a/apps/dav/tests/travis/carddavtester.sh
+++ b/apps/dav/tests/travis/carddavtester.sh
@@ -18,11 +18,14 @@ fi
# create test user
cd "$SCRIPTPATH/../../../../"
OC_PASS=user01 php occ user:add --password-from-env user01
+php occ dav:create-addressbook user01 addressbook
OC_PASS=user02 php occ user:add --password-from-env user02
+php occ dav:create-addressbook user02 addressbook
cd "$SCRIPTPATH/../../../../"
# run the tests
cd "$SCRIPTPATH/CalDAVTester"
PYTHONPATH="$SCRIPTPATH/pycalendar/src" python testcaldav.py --print-details-onfail -s "$SCRIPTPATH/caldavtest/config/serverinfo.xml" -o cdt.txt \
- "$SCRIPTPATH/caldavtest/tests/CardDAV/current-user-principal.xml"
+ "$SCRIPTPATH/caldavtest/tests/CardDAV/current-user-principal.xml" \
+ "$SCRIPTPATH/caldavtest/tests/CardDAV/sync-report.xml"