aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/testsuits
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests/testsuits')
-rw-r--r--apps/dav/tests/testsuits/caldav/install.sh30
-rw-r--r--apps/dav/tests/testsuits/caldav/script-new-endpoint.sh29
-rw-r--r--apps/dav/tests/testsuits/caldav/script-old-endpoint.sh28
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/current-user-principal/1.xml10
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/1.txt32
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/1.xml17
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/2.txt33
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/3.txt34
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/4.txt39
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/5.txt38
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/6.txt48
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/1.xml11
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/10.xml10
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/11.xml11
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/2.xml9
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/21.xml11
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/3.xml9
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/4.xml9
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/5.xml12
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/6.xml12
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/7.xml12
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/8.xml10
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/1.xml12
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/4.xml12
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.ics29
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.xml10
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/6.ics29
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/7.ics29
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/8.ics29
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/9.ics29
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/1.xml12
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/4.xml12
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/6.vcf11
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/7.vcf11
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/8.vcf11
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/9.vcf11
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vcurrent-user-principal/1.xml10
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/put/1.vcf11
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/put/2.vcf17
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/put/3.vcf12
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/sync/1.xml11
-rw-r--r--apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/sync/2.xml9
-rw-r--r--apps/dav/tests/testsuits/caldavtest/serverinfo-new-endpoint.xml842
-rw-r--r--apps/dav/tests/testsuits/caldavtest/serverinfo-old-caldav-endpoint.xml838
-rw-r--r--apps/dav/tests/testsuits/caldavtest/serverinfo-old-carddav-endpoint.xml838
-rw-r--r--apps/dav/tests/testsuits/caldavtest/serverinfo.dtd32
-rw-r--r--apps/dav/tests/testsuits/caldavtest/tests/CalDAV/current-user-principal.xml140
-rw-r--r--apps/dav/tests/testsuits/caldavtest/tests/CalDAV/sharing-calendars.xml578
-rw-r--r--apps/dav/tests/testsuits/caldavtest/tests/CalDAV/sync-report.xml3318
-rw-r--r--apps/dav/tests/testsuits/caldavtest/tests/CardDAV/current-user-principal.xml139
-rw-r--r--apps/dav/tests/testsuits/caldavtest/tests/CardDAV/sharing-addressbooks.xml314
-rw-r--r--apps/dav/tests/testsuits/caldavtest/tests/CardDAV/sync-report.xml1591
-rw-r--r--apps/dav/tests/testsuits/carddav/install.sh24
-rw-r--r--apps/dav/tests/testsuits/carddav/script-new-endpoint.sh29
-rw-r--r--apps/dav/tests/testsuits/carddav/script-old-endpoint.sh26
-rw-r--r--apps/dav/tests/testsuits/carddav/script.sh26
-rw-r--r--apps/dav/tests/testsuits/litmus-v1/script.sh18
-rw-r--r--apps/dav/tests/testsuits/litmus-v2/script.sh18
58 files changed, 9542 insertions, 0 deletions
diff --git a/apps/dav/tests/testsuits/caldav/install.sh b/apps/dav/tests/testsuits/caldav/install.sh
new file mode 100644
index 00000000000..ecbab3a1fd7
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldav/install.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+#
+# SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
+# SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+# SPDX-License-Identifier: AGPL-3.0-only
+#
+SCRIPT=`realpath $0`
+SCRIPTPATH=`dirname $SCRIPT`
+
+
+cd "$SCRIPTPATH"
+if [ ! -f CalDAVTester/testcaldav.py ]; then
+ git clone https://github.com/apple/ccs-caldavtester.git CalDAVTester
+fi
+if [ ! -f pycalendar/setup.py ]; then
+ git clone https://github.com/apple/ccs-pycalendar.git pycalendar
+fi
+
+cd "$SCRIPTPATH/../../../../../"
+
+# disable the trashbin, so recurrent deletion of the same object works
+php occ config:app:set dav calendarRetentionObligation --value=0
+
+# create test user
+OC_PASS=user01 php occ user:add --password-from-env user01
+php occ dav:create-calendar user01 calendar
+php occ dav:create-calendar user01 shared
+OC_PASS=user02 php occ user:add --password-from-env user02
+php occ dav:create-calendar user02 calendar
+cd "$SCRIPTPATH/../../../../../"
diff --git a/apps/dav/tests/testsuits/caldav/script-new-endpoint.sh b/apps/dav/tests/testsuits/caldav/script-new-endpoint.sh
new file mode 100644
index 00000000000..91a78e97e35
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldav/script-new-endpoint.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+#
+# SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
+# SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+# SPDX-License-Identifier: AGPL-3.0-only
+#
+SCRIPT=`realpath $0`
+SCRIPTPATH=`dirname $SCRIPT`
+
+# Move the endpoint to the serverinfo file
+cp "$SCRIPTPATH/../caldavtest/serverinfo-new-endpoint.xml" "$SCRIPTPATH/../caldavtest/serverinfo.xml"
+
+# start the server
+php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../../.." &
+
+sleep 30
+
+# run the tests
+cd "$SCRIPTPATH/CalDAVTester"
+PYTHONPATH="$SCRIPTPATH/pycalendar/src" python testcaldav.py --print-details-onfail --basedir "$SCRIPTPATH/../caldavtest/" -o cdt.txt \
+ "CalDAV/current-user-principal.xml" \
+ "CalDAV/sync-report.xml" \
+ "CalDAV/sharing-calendars.xml"
+
+RESULT=$?
+
+tail "$/../../../../../data-autotest/nextcloud.log"
+
+exit $RESULT
diff --git a/apps/dav/tests/testsuits/caldav/script-old-endpoint.sh b/apps/dav/tests/testsuits/caldav/script-old-endpoint.sh
new file mode 100644
index 00000000000..cbe2d0d85fa
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldav/script-old-endpoint.sh
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+#
+# SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
+# SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+# SPDX-License-Identifier: AGPL-3.0-only
+#
+SCRIPT=`realpath $0`
+SCRIPTPATH=`dirname $SCRIPT`
+
+# Move the endpoint to the serverinfo file
+cp "$SCRIPTPATH/../caldavtest/serverinfo-old-caldav-endpoint.xml" "$SCRIPTPATH/../caldavtest/serverinfo.xml"
+
+# start the server
+php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../../.." &
+
+sleep 30
+
+# run the tests
+cd "$SCRIPTPATH/CalDAVTester"
+PYTHONPATH="$SCRIPTPATH/pycalendar/src" python testcaldav.py --print-details-onfail --basedir "$SCRIPTPATH/../caldavtest/" -o cdt.txt \
+ "CalDAV/current-user-principal.xml" \
+ "CalDAV/sync-report.xml"
+
+RESULT=$?
+
+tail "$/../../../../../data-autotest/nextcloud.log"
+
+exit $RESULT
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/current-user-principal/1.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/current-user-principal/1.xml
new file mode 100644
index 00000000000..b84d2cedf68
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/current-user-principal/1.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2013 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:propfind xmlns:D="DAV:">
+ <D:prop>
+ <D:current-user-principal/>
+ </D:prop>
+</D:propfind>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/1.txt b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/1.txt
new file mode 100644
index 00000000000..2d0a3641ac4
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/1.txt
@@ -0,0 +1,32 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Example Inc.//Example Calendar//EN
+VERSION:2.0
+BEGIN:VTIMEZONE
+LAST-MODIFIED:20040110T032845Z
+TZID:US/Eastern
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+DTSTAMP:20051222T205953Z
+CREATED:20060101T150000Z
+DTSTART;TZID=US/Eastern:$now.year.1:0101T100000
+DURATION:PT1H
+SUMMARY:event 1
+UID:54E181BC7CCC373042B28842@ninevah.local
+CATEGORIES:cool
+END:VEVENT
+END:VCALENDAR
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/1.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/1.xml
new file mode 100644
index 00000000000..3ac43b1d507
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/1.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:mkcol xmlns:D="DAV:"
+ xmlns:E="urn:ietf:params:xml:ns:caldav">
+ <D:set>
+ <D:prop>
+ <D:resourcetype>
+ <D:collection/>
+ <E:calendar/>
+ </D:resourcetype>
+ <D:displayname>Special Resource</D:displayname>
+ </D:prop>
+ </D:set>
+</D:mkcol>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/2.txt b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/2.txt
new file mode 100644
index 00000000000..67de0524ec3
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/2.txt
@@ -0,0 +1,33 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Example Inc.//Example Calendar//EN
+VERSION:2.0
+BEGIN:VTIMEZONE
+LAST-MODIFIED:20040110T032845Z
+TZID:US/Mountain
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:MDT
+TZOFFSETFROM:-0700
+TZOFFSETTO:-0600
+END:DAYLIGHT
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:MST
+TZOFFSETFROM:-0600
+TZOFFSETTO:-0700
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+DTSTAMP:20051222T210052Z
+CREATED:20060101T160000Z
+DTSTART;TZID=US/Mountain:$now.year.1:0101T110000
+DURATION:PT1H
+SUMMARY:event 2
+DESCRIPTION:Some notes
+UID:9A6519F71822CD45840C3440@ninevah.local
+CATEGORIES:cool,hot
+END:VEVENT
+END:VCALENDAR
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/3.txt b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/3.txt
new file mode 100644
index 00000000000..bfdc0dbd116
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/3.txt
@@ -0,0 +1,34 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Example Inc.//Example Calendar//EN
+VERSION:2.0
+BEGIN:VTIMEZONE
+LAST-MODIFIED:20040110T032845Z
+TZID:US/Pacific
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:PDT
+TZOFFSETFROM:-0800
+TZOFFSETTO:-0700
+END:DAYLIGHT
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:PST
+TZOFFSETFROM:-0700
+TZOFFSETTO:-0800
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+DTSTAMP:20051222T210146Z
+CREATED:20060101T210000Z
+DTSTART;TZID=US/Pacific:$now.year.1:0101T130000
+DURATION:PT1H
+LAST-MODIFIED:20051222T210203Z
+SEQUENCE:1
+SUMMARY:event 3
+UID:DB3F97EF10A051730E2F752E@ninevah.local
+CATEGORIES:hot
+END:VEVENT
+END:VCALENDAR
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/4.txt b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/4.txt
new file mode 100644
index 00000000000..be223854641
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/4.txt
@@ -0,0 +1,39 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Example Inc.//Example Calendar//EN
+VERSION:2.0
+BEGIN:VTIMEZONE
+LAST-MODIFIED:20040110T032845Z
+TZID:US/Eastern
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+DTSTAMP:20051222T210310Z
+CREATED:20060101T230000Z
+DTSTART;TZID=US/Eastern:$now.year.1:0101T180000
+DURATION:PT1H
+SUMMARY:event 4
+UID:A3217B429B4D2FF2DC2EEE66@ninevah.local
+CATEGORIES:cool
+CATEGORIES:hot
+BEGIN:VALARM
+ACTION:AUDIO
+TRIGGER;RELATED=START:-PT1H
+REPEAT:5
+DURATION:PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/5.txt b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/5.txt
new file mode 100644
index 00000000000..e1d701e2698
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/5.txt
@@ -0,0 +1,38 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Example Inc.//Example Calendar//EN
+VERSION:2.0
+BEGIN:VTIMEZONE
+LAST-MODIFIED:20040110T032845Z
+TZID:US/Eastern
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+DTSTAMP:20051222T210412Z
+CREATED:20060102T150000Z
+DTSTART;TZID=US/Eastern:$now.year.1:0102T100000
+DURATION:PT1H
+RRULE:FREQ=DAILY;COUNT=5
+SUMMARY:event 5
+UID:945113826375CBB89184DC36@ninevah.local
+CATEGORIES:cool,hot
+CATEGORIES:warm
+BEGIN:VALARM
+ACTION:AUDIO
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/6.txt b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/6.txt
new file mode 100644
index 00000000000..ecabe13a707
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/6.txt
@@ -0,0 +1,48 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Example Inc.//Example Calendar//EN
+VERSION:2.0
+BEGIN:VTIMEZONE
+LAST-MODIFIED:20040110T032845Z
+TZID:US/Eastern
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+DTSTAMP:20051222T210507Z
+CREATED:20060102T190000Z
+DTSTART;TZID=US/Eastern:$now.year.1:0102T140000
+DURATION:PT1H
+RRULE:FREQ=DAILY;COUNT=5
+SUMMARY:event 6
+UID:F5B811E00073B22BA6B87551@ninevah.local
+CATEGORIES:warm,hot
+CATEGORIES:cool
+END:VEVENT
+BEGIN:VEVENT
+DTSTAMP:20051222T210507Z
+UID:F5B811E00073B22BA6B87551@ninevah.local
+RECURRENCE-ID;TZID=US/Eastern:$now.year.1:0104T140000
+CREATED:20060102T190000Z
+DTSTART;TZID=US/Eastern:$now.year.1:0104T160000
+DURATION:PT1H
+SUMMARY:event 6 changed
+DESCRIPTION:Some notes
+BEGIN:VALARM
+ACTION:AUDIO
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/1.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/1.xml
new file mode 100644
index 00000000000..343f73a6f84
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/1.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:propfind xmlns:D="DAV:">
+ <D:prop>
+ <D:supported-report-set/>
+ <D:sync-token/>
+ </D:prop>
+</D:propfind>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/10.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/10.xml
new file mode 100644
index 00000000000..494f75ff986
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/10.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token/>
+<D:sync-level>bogus</D:sync-level>
+<D:prop/>
+</D:sync-collection>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/11.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/11.xml
new file mode 100644
index 00000000000..dffb0310eba
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/11.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>null</D:sync-token>
+<D:prop>
+<D:getetag/>
+</D:prop>
+</D:sync-collection>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/2.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/2.xml
new file mode 100644
index 00000000000..fc8270bb8d8
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/2.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token/>
+<D:prop/>
+</D:sync-collection>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/21.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/21.xml
new file mode 100644
index 00000000000..cfbb3ff6c5e
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/21.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token/>
+<D:sync-level>0</D:sync-level>
+<D:limit><D:nresults>10</D:nresults></D:limit>
+<D:prop/>
+</D:sync-collection>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/3.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/3.xml
new file mode 100644
index 00000000000..2ee8f3e0f3c
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/3.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken1:</D:sync-token>
+<D:prop/>
+</D:sync-collection>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/4.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/4.xml
new file mode 100644
index 00000000000..1b8f73c98b0
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/4.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken2:</D:sync-token>
+<D:prop/>
+</D:sync-collection>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/5.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/5.xml
new file mode 100644
index 00000000000..769ebb6907e
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/5.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token/>
+<D:prop>
+<D:getcontenttype/>
+<D:getetag/>
+</D:prop>
+</D:sync-collection>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/6.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/6.xml
new file mode 100644
index 00000000000..78c175c3f03
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/6.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken1:</D:sync-token>
+<D:prop>
+<D:getcontenttype/>
+<D:getetag/>
+</D:prop>
+</D:sync-collection>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/7.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/7.xml
new file mode 100644
index 00000000000..b7aa5926c87
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/7.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken2:</D:sync-token>
+<D:prop>
+<D:getcontenttype/>
+<D:getetag/>
+</D:prop>
+</D:sync-collection>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/8.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/8.xml
new file mode 100644
index 00000000000..d61c413e2a4
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/sync/8.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token/>
+<D:sync-level>1</D:sync-level>
+<D:prop/>
+</D:sync-collection>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/1.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/1.xml
new file mode 100644
index 00000000000..3be574add20
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/1.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<CS:share xmlns:D="DAV:" xmlns:CS="http://owncloud.org/ns">
+ <CS:set>
+ <D:href>principal:principals/users/user02</D:href>
+ <CS:summary>My Shared Calendar</CS:summary>
+ <CS:read-write/>
+ </CS:set>
+</CS:share>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/4.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/4.xml
new file mode 100644
index 00000000000..5c679977eb9
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/4.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:resourcetype/>
+<D:owner/>
+<D:current-user-privilege-set/>
+</D:prop>
+</D:propfind>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.ics b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.ics
new file mode 100644
index 00000000000..ae21adac8b2
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.ics
@@ -0,0 +1,29 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//PYVOBJECT//NONSGML Version 1//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:$uid1:
+DTSTART;TZID=US/Eastern:$now.year.1:0101T100000
+DURATION:PT1H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 1
+END:VEVENT
+END:VCALENDAR
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.xml
new file mode 100644
index 00000000000..e13f1dd3cb1
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:propfind xmlns:D="DAV:" xmlns:CS="http://owncloud.org/ns">
+<D:prop>
+<CS:invite/>
+</D:prop>
+</D:propfind>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/6.ics b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/6.ics
new file mode 100644
index 00000000000..145f5f14c7b
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/6.ics
@@ -0,0 +1,29 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//PYVOBJECT//NONSGML Version 1//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:$uid1:
+DTSTART;TZID=US/Eastern:$now.year.1:0101T100000
+DURATION:PT4H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 4
+END:VEVENT
+END:VCALENDAR
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/7.ics b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/7.ics
new file mode 100644
index 00000000000..c4e816210df
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/7.ics
@@ -0,0 +1,29 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//PYVOBJECT//NONSGML Version 1//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:$uid2:
+DTSTART;TZID=US/Eastern:$now.year.1:0201T100000
+DURATION:PT1H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 7
+END:VEVENT
+END:VCALENDAR
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/8.ics b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/8.ics
new file mode 100644
index 00000000000..2da72d2f601
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/8.ics
@@ -0,0 +1,29 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//PYVOBJECT//NONSGML Version 1//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:$uid2:
+DTSTART;TZID=US/Eastern:$now.year.1:0201T100000
+DURATION:PT7H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 7-1
+END:VEVENT
+END:VCALENDAR
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/9.ics b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/9.ics
new file mode 100644
index 00000000000..dfc21bb9c5b
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/9.ics
@@ -0,0 +1,29 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//PYVOBJECT//NONSGML Version 1//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:$uid3:
+DTSTART;TZID=US/Eastern:$now.year.1:0201T100000
+DURATION:PT7H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 9.ics
+END:VEVENT
+END:VCALENDAR
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/1.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/1.xml
new file mode 100644
index 00000000000..482682b12ec
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/1.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<CS:share xmlns:D="DAV:" xmlns:CS="http://owncloud.org/ns">
+ <CS:set>
+ <D:href>principal:principals/users/user02</D:href>
+ <CS:summary>My Shared Calendar</CS:summary>
+ <CS:read-write/>
+ </CS:set>
+</CS:share>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/4.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/4.xml
new file mode 100644
index 00000000000..5c679977eb9
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/4.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:resourcetype/>
+<D:owner/>
+<D:current-user-privilege-set/>
+</D:prop>
+</D:propfind>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/6.vcf b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/6.vcf
new file mode 100644
index 00000000000..6b53f8ba3bf
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/6.vcf
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Thompson;Default;;;
+FN:Default Thompson
+EMAIL;TYPE=INTERNET,WORK,pref:lthompson@example.com
+TEL;TYPE=WORK,pref:1-555-555-5555
+TEL;TYPE=CELL:1-555-555-5555
+ITEM1.ADR;TYPE=WORK,pref:;;2 Lag;Elk Forest;California;99999;USA
+ITEM1.X-ABADR:us
+UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
+END:VCARD
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/7.vcf b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/7.vcf
new file mode 100644
index 00000000000..27fdb9fae5f
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/7.vcf
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Thompson;Default;;;
+FN:Default Thompson
+EMAIL;TYPE=INTERNET,WORK,pref:lthompson@example.net
+TEL;TYPE=WORK,pref:1-555-555-5555
+TEL;TYPE=CELL:1-555-555-6666
+ITEM1.ADR;TYPE=WORK,pref:;;2 Lag;Elk Forest;California;99999;USA
+ITEM1.X-ABADR:us
+UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
+END:VCARD
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/8.vcf b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/8.vcf
new file mode 100644
index 00000000000..9188fdd913c
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/8.vcf
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Miller;Default;;;
+FN:Default Miller
+EMAIL;TYPE=INTERNET,WORK,pref:lthompson@example.com
+TEL;TYPE=WORK,pref:1-555-555-5555
+TEL;TYPE=CELL:1-555-555-5555
+ITEM1.ADR;TYPE=WORK,pref:;;2 Lag;Elk Forest;California;99999;USA
+ITEM1.X-ABADR:us
+UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
+END:VCARD
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/9.vcf b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/9.vcf
new file mode 100644
index 00000000000..1ca0a36ca4c
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/9.vcf
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Smith;Default;;;
+FN:Default Smith
+EMAIL;TYPE=INTERNET,WORK,pref:lthompson@example.com
+TEL;TYPE=WORK,pref:1-555-555-5555
+TEL;TYPE=CELL:1-555-555-5555
+ITEM1.ADR;TYPE=WORK,pref:;;2 Lag;Elk Forest;California;99999;USA
+ITEM1.X-ABADR:us
+UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
+END:VCARD
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vcurrent-user-principal/1.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vcurrent-user-principal/1.xml
new file mode 100644
index 00000000000..d101bc698b5
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vcurrent-user-principal/1.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:current-user-principal/>
+</D:prop>
+</D:propfind>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/put/1.vcf b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/put/1.vcf
new file mode 100644
index 00000000000..2121c65f1f4
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/put/1.vcf
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Thompson;Default;;;
+FN:Default Thompson
+EMAIL;type=INTERNET;type=WORK;type=pref:lthompson@example.com
+TEL;type=WORK;type=pref:1-555-555-5555
+TEL;type=CELL:1-555-555-5555
+item1.ADR;type=WORK;type=pref:;;2 Lag;Elk Forest;California;99999;USA
+item1.X-ABADR:us
+UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
+END:VCARD
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/put/2.vcf b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/put/2.vcf
new file mode 100644
index 00000000000..390a3d8ae69
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/put/2.vcf
@@ -0,0 +1,17 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Contact;Mulberry;;;
+FN:Mulberry Contact
+NICKNAME:mulberry
+ORG:Apple Inc.;
+EMAIL;type=INTERNET;type=WORK;type=pref:mulberry_contact@example.com
+TEL;type=HOME;type=pref:555-555-5555
+TEL;type=WORK:555-555-5555
+TEL;type=WORK;type=FAX:555-555-5555
+item1.ADR;type=WORK;type=pref:;;1 Infinite Circle;Exampletino\, CA 99999;USA;;
+item1.X-ABADR:us
+NOTE:This is a contact created in Mulberry.
+item2.URL;type=pref:http://www.example.com/~magic
+item2.X-ABLabel:_$!<HomePage>!$_
+UID:782DAAF92CB1ED1BC155CDB3@D76FAF7B10D9E8D2D41F779D
+END:VCARD
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/put/3.vcf b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/put/3.vcf
new file mode 100644
index 00000000000..37c3b81bdcf
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/put/3.vcf
@@ -0,0 +1,12 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Kawado;Saeko;;;
+FN:Snow Leopard
+ORG:Snow Leopard;
+EMAIL;type=INTERNET;type=WORK;type=pref:snowleopard_apple@example.com
+TEL;type=WORK;type=pref:555-555-5555
+item1.ADR;type=WORK;type=pref:;;2 Fidel Ave. Suite 1;Mountain Top;CA;99999;USA
+item1.X-ABADR:us
+X-ABShowAs:COMPANY
+UID:FCBA0FA3-00B2-4C95-B4EC-4CCC4843F8B1:ABPerson
+END:VCARD
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/sync/1.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/sync/1.xml
new file mode 100644
index 00000000000..8818cef1e29
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/sync/1.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:supported-report-set/>
+<D:sync-token/>
+</D:prop>
+</D:propfind>
diff --git a/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/sync/2.xml b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/sync/2.xml
new file mode 100644
index 00000000000..fc8270bb8d8
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/sync/2.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ - SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ - SPDX-License-Identifier: AGPL-3.0-only
+-->
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token/>
+<D:prop/>
+</D:sync-collection>
diff --git a/apps/dav/tests/testsuits/caldavtest/serverinfo-new-endpoint.xml b/apps/dav/tests/testsuits/caldavtest/serverinfo-new-endpoint.xml
new file mode 100644
index 00000000000..524f2ef609d
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/serverinfo-new-endpoint.xml
@@ -0,0 +1,842 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE serverinfo SYSTEM "./serverinfo.dtd">
+
+<!--
+ - SPDX-FileCopyrightText: 2006-2015 Apple Inc. All rights reserved.
+ - SPDX-License-Identifier: Apache-2.0
+-->
+
+<serverinfo>
+ <host>localhost</host>
+ <nonsslport>8888</nonsslport>
+ <authtype>basic</authtype>
+ <!-- <unix>/tmp/caldavd_requests/unsecured.sock</unix> -->
+
+ <waitcount>120</waitcount>
+ <waitdelay>0.25</waitdelay>
+ <waitsuccess>30</waitsuccess>
+
+ <features>
+ <!-- Generic WebDAV extensions -->
+ <feature>COPY Method</feature> <!-- COPY method -->
+ <feature>MOVE Method</feature> <!-- MOVE method -->
+ <feature>Extended MKCOL</feature> <!-- Extended MKCOL -->
+
+ <!-- ACL related -->
+ <feature>ACL Method</feature> <!-- ACL method -->
+ <feature>acl-principal-prop-set REPORT</feature> <!-- ACL acl-principal-prop-set REPORT -->
+ <feature>principal-match REPORT</feature> <!-- ACL principal-match REPORT -->
+ <feature>principal-property-search REPORT</feature> <!-- ACL principal-property-search REPORT -->
+ <feature>principal-search-property-set REPORT</feature> <!-- ACL principal-search-property-set REPORT -->
+ <feature>calendarserver-principal-search REPORT</feature> <!-- ACL calendarserver-principal-search REPORT -->
+
+ <feature>add-member</feature> <!-- Add-member used to create resources -->
+ <!-- <feature>auth-on-root</feature> --> <!-- Whether the server requires authentication on the root URI -->
+ <feature>brief</feature> <!-- Brief header for PROPFIND, REPORT -->
+ <feature>bulk-post</feature> <!-- Bulk POST requests -->
+ <feature>ctag</feature> <!-- ctag extension -->
+ <feature>current-user-principal</feature> <!-- current-user-principal extension -->
+ <feature>directory listing</feature> <!-- GET on collection -->
+ <feature>extended-principal-search</feature> <!-- Extended principal-property-search REPORT extension -->
+ <feature>expand-property</feature> <!-- Expand property REPORT -->
+ <feature>only-proxy-groups</feature> <!-- Group-membership only includes delegated-to groups -->
+ <feature>limits</feature> <!-- max-collections and max-resources limits -->
+ <feature>own-root</feature> <!-- / is owned by this service -->
+ <feature>prefer</feature> <!-- Prefer header overall support -->
+ <feature>prefer-minimal</feature> <!-- Prefer header return=minimal -->
+ <feature>prefer-representation</feature> <!-- Prefer header return=representation -->
+ <feature>prefer-noroot</feature> <!-- Prefer header depth-noroot -->
+ <feature>quota</feature> <!-- WebDAV QUOTA -->
+ <!-- <feature>quota-on-resources</feature> --> <!-- WebDAV QUOTA on calendar and address book object resources -->
+ <feature>resource-id</feature> <!-- WebDAV BIND DAV:resource-id property -->
+ <feature>sync-report</feature> <!-- WebDAV collection sync REPORT -->
+ <!-- <feature>sync-report-limit</feature> --> <!-- WebDAV collection sync REPORT DAV:limit support -->
+ <!--<feature>sync-report-home</feature> &lt;!&ndash; WebDAV collection sync REPORT on Homes &ndash;&gt;-->
+ <feature>sync-report-config-token</feature> <!-- Sync REPORT token includes configuration component -->
+ <feature>well-known</feature> <!-- well-known feature -->
+
+ <!-- <feature>per-object-ACLs</feature> --> <!-- ACL for objects in calendar/address books -->
+ <!-- <feature>regular-collection</feature> --> <!-- Regular collections allowed in calendar/address book homes -->
+
+ <feature>json-data</feature> <!-- jCal and jCard support -->
+
+ <!-- CalendarServer specific extensions -->
+ <feature>control-api</feature> <!-- Control API support -->
+
+ <!-- CalDAV specific extension -->
+ <feature>caldav</feature> <!-- Basic CalDAV feature enabler -->
+ <feature>attachments-collection</feature> <!-- Server uses a collection in same WebDAV tree to store attachments -->
+ <feature>auto-accept</feature> <!-- Auto-accept for rooms & locations -->
+ <feature>auto-accept-modes</feature> <!-- Auto-accept modes -->
+ <feature>client-fix-TRANSP</feature> <!-- fix client TRANSP -->
+ <!-- <feature>dropbox</feature> --> <!-- dropbox extension -->
+ <feature>default-alarms</feature> <!-- default alarms extension -->
+ <feature>EMAIL parameter</feature> <!-- Server normalizes cuaddress and adds EMAIL parameter -->
+ <feature>extended-freebusy</feature> <!-- Extended freebusy response -->
+ <feature>freebusy-url</feature> <!-- Freebusy URL -->
+ <feature>group-attendee-expansion</feature> <!-- Auto-expansion of group attendees -->
+ <feature>implicit-scheduling</feature> <!-- CalDAV scheduling - implicit -->
+ <feature>location-resource-tracking</feature> <!-- Server tracks who makes unscheduled changes to locations and resources -->
+ <feature>managed-attachments</feature> <!-- CalDAV Managed Attachments -->
+ <feature>maskuid</feature> <!-- maskuid extension -->
+ <feature>no-duplicate-uids</feature> <!-- duplicate UIDs in same home not supported -->
+ <feature>partstat-timestamp</feature> <!-- Time stamps when PARTSTAT changes extension -->
+ <!-- <feature>podding</feature> --> <!-- Podded server -->
+ <feature>private-comments</feature> <!-- private-comments extension -->
+ <feature>private-events</feature> <!-- private-events extension -->
+ <feature>proxy</feature> <!-- calendar-user-proxy extension -->
+ <!-- <feature>proxy-authz</feature> --> <!-- sudo user extension -->
+ <feature>recurrence-splitting</feature> <!-- Recurring components can be split -->
+ <feature>remove-duplicate-alarms</feature> <!-- Server removes any duplicate alarms on PUT -->
+ <feature>query-extended</feature> <!-- calendar-query-extended extension -->
+ <feature>shared-calendars</feature> <!-- Shared calendars extension -->
+ <feature>share-calendars-to-groups</feature> <!-- Share calendars to groups extension -->
+ <feature>schedule-changes</feature> <!-- schedule-changes property extension -->
+ <feature>split-calendars</feature> <!-- Calendars are split by component type -->
+ <feature>supported-component-sets</feature> <!-- CALDAV:supported-calendar-component-sets on calendar homes -->
+ <feature>supported-component-sets-one</feature> <!-- Only single component calendars allowed to be created -->
+ <feature>timerange-low-limit</feature> <!-- Time-range only valid one year back -->
+ <feature>timerange-high-limit</feature> <!-- Time-range only valid 5 years ahead -->
+ <feature>timezones-by-reference</feature> <!-- Timezones by reference enabled -->
+ <feature>timezone-service</feature> <!-- Timezone service extension for Wiki -->
+ <feature>timezone-std-service</feature> <!-- Timezone standard service extension -->
+ <!-- <feature>trash-collection</feature> --> <!-- Trash collection enabled -->
+ <feature>travel-time-busy</feature> <!-- Travel time appears as busy -->
+ <feature>vavailability</feature> <!-- VAVAILABILITY on inbox -->
+ <!-- <feature>vpoll</feature> --> <!-- VPOLL support for store and scheduling -->
+ <feature>webcal</feature> <!-- Internet calendar subscription via GET on calendar collection -->
+
+ <!-- CardDAV specific extension -->
+ <feature>carddav</feature> <!-- Basic CardDAV feature enabler -->
+ <feature>default-addressbook</feature> <!-- Default address book behavior -->
+ <feature>shared-addressbooks</feature> <!-- Shared address books extension -->
+ <feature>shared-addressbook-groups</feature> <!-- Shared address book groups extension -->
+ <feature>directory-gateway</feature> <!-- Directory gateway extension -->
+
+ </features>
+
+ <substitutions>
+ <!-- Useful xpath shortcuts for verifiers -->
+ <substitution>
+ <key>$multistatus-response-prefix:</key>
+ <value>/{DAV:}multistatus/{DAV:}response</value>
+ </substitution>
+ <substitution>
+ <key>$multistatus-href-prefix:</key>
+ <value>/{DAV:}multistatus/{DAV:}response/{DAV:}href</value>
+ </substitution>
+ <substitution>
+ <key>$verify-response-prefix:</key>
+ <value>{DAV:}response/{DAV:}propstat/{DAV:}prop</value>
+ </substitution>
+ <substitution>
+ <key>$verify-property-prefix:</key>
+ <value>/{DAV:}multistatus/{DAV:}response/{DAV:}propstat/{DAV:}prop</value>
+ </substitution>
+ <substitution>
+ <key>$verify-bad-response:</key>
+ <value>/{DAV:}multistatus/{DAV:}response/{DAV:}status</value>
+ </substitution>
+ <substitution>
+ <key>$verify-error-response:</key>
+ <value>/{DAV:}multistatus/{DAV:}response/{DAV:}error</value>
+ </substitution>
+ <substitution>
+ <key>$CALDAV:</key>
+ <value>urn:ietf:params:xml:ns:caldav</value>
+ </substitution>
+ <substitution>
+ <key>$CARDDAV:</key>
+ <value>urn:ietf:params:xml:ns:carddav</value>
+ </substitution>
+ <substitution>
+ <key>$CS:</key>
+ <value>http://calendarserver.org/ns/</value>
+ </substitution>
+
+ <!-- Server configuration settings -->
+ <!-- $host: and $hostssl: are implicitly added by CalDAVTester based
+ on the host/nonsslport/sslport values and ssl command line switch -->
+
+ <!-- relative path to caldav root-->
+ <substitution>
+ <key>$root:</key>
+ <value>/remote.php/dav/</value>
+ </substitution>
+
+ <!-- relative path to main principal collection-->
+ <substitution>
+ <key>$principalcollection:</key>
+ <value>$root:principals/</value>
+ </substitution>
+
+ <!-- the core record type collections-->
+ <substitution>
+ <key>$uidstype:</key>
+ <value>__uids__</value>
+ </substitution>
+ <substitution>
+ <key>$userstype:</key>
+ <value>users</value>
+ </substitution>
+ <substitution>
+ <key>$groupstype:</key>
+ <value>groups</value>
+ </substitution>
+ <substitution>
+ <key>$locationstype:</key>
+ <value>locations</value>
+ </substitution>
+ <substitution>
+ <key>$resourcestype:</key>
+ <value>resources</value>
+ </substitution>
+
+ <!-- relative path to record type principal collections-->
+ <substitution>
+ <key>$principals_uids:</key>
+ <value>$principalcollection:$uidstype:/</value>
+ </substitution>
+ <substitution>
+ <key>$principals_users:</key>
+ <value>$principalcollection:$userstype:/</value>
+ </substitution>
+ <substitution>
+ <key>$principals_groups:</key>
+ <value>$principalcollection:$groupstype:/</value>
+ </substitution>
+ <substitution>
+ <key>$principals_resources:</key>
+ <value>$principalcollection:$resourcestype:/</value>
+ </substitution>
+ <substitution>
+ <key>$principals_locations:</key>
+ <value>$principalcollection:$locationstype:/</value>
+ </substitution>
+
+ <!-- relative path to calendars collection-->
+ <substitution>
+ <key>$calendars:</key>
+ <value>$root:calendars/</value>
+ </substitution>
+
+ <!-- relative path to record type calendar collections-->
+ <substitution>
+ <key>$calendars_uids:</key>
+ <value>$calendars:$uidstype:/</value>
+ </substitution>
+ <substitution>
+ <key>$calendars_users:</key>
+ <value>$calendars:$userstype:/</value>
+ </substitution>
+ <substitution>
+ <key>$calendars_resources:</key>
+ <value>$calendars:$resourcestype:/</value>
+ </substitution>
+ <substitution>
+ <key>$calendars_locations:</key>
+ <value>$calendars:$locationstype:/</value>
+ </substitution>
+
+ <!-- primary calendar name-->
+ <substitution>
+ <key>$calendar:</key>
+ <value>calendar</value>
+ </substitution>
+
+ <!-- primary tasks-only calendar name-->
+ <substitution>
+ <key>$tasks:</key>
+ <value>tasks</value>
+ </substitution>
+
+ <!-- primary polls-only calendar name-->
+ <substitution>
+ <key>$polls:</key>
+ <value>polls</value>
+ </substitution>
+
+ <!-- inbox name-->
+ <substitution>
+ <key>$inbox:</key>
+ <value>inbox</value>
+ </substitution>
+
+ <!-- outbox name-->
+ <substitution>
+ <key>$outbox:</key>
+ <value>outbox</value>
+ </substitution>
+
+ <!-- dropbox name-->
+ <substitution>
+ <key>$dropbox:</key>
+ <value>dropbox</value>
+ </substitution>
+
+ <!-- attachments name-->
+ <substitution>
+ <key>$attachments:</key>
+ <value>dropbox</value>
+ </substitution>
+
+ <!-- notification name-->
+ <substitution>
+ <key>$notification:</key>
+ <value>notification</value>
+ </substitution>
+
+ <!-- freebusy name-->
+ <substitution>
+ <key>$freebusy:</key>
+ <value>freebusy</value>
+ </substitution>
+
+ <!-- Sync home collection items - use "-" to include the home resource-->
+ <substitution>
+ <key>$calendar_home_items_initial_sync:</key>
+ <value>[-,$calendar:/,$tasks:/,$inbox:/,$outbox:/,$freebusy:,$notification:/]</value>
+ </substitution>
+
+ <!-- Sync collection extra items - use "-" to include the collection-->
+ <substitution>
+ <key>$calendar_sync_extra_items:</key>
+ <value>[-]</value>
+ </substitution>
+
+ <!-- Sync collection extra count - gets added to the totalcount value-->
+ <substitution>
+ <key>$calendar_sync_extra_count:</key>
+ <value>1</value> <!-- the request-uri resource is returned when no token passed-->
+ </substitution>
+
+ <!-- server-to-server inbox-->
+ <substitution>
+ <key>$servertoserver:</key>
+ <value>$root:inbox</value>
+ </substitution>
+
+ <!-- timezone service-->
+ <substitution>
+ <key>$timezoneservice:</key>
+ <value>$root:timezones</value>
+ </substitution>
+
+ <!-- timezone std service-->
+ <substitution>
+ <key>$timezonestdservice:</key>
+ <value>$root:stdtimezones</value>
+ </substitution>
+
+ <!-- relative path to addressbooks collection-->
+ <substitution>
+ <key>$addressbooks:</key>
+ <value>$root:addressbooks/</value>
+ </substitution>
+
+ <!-- relative path to record type addressbook collections-->
+ <substitution>
+ <key>$addressbooks_uids:</key>
+ <value>$addressbooks:$uidstype:/</value>
+ </substitution>
+ <substitution>
+ <key>$addressbooks_users:</key>
+ <value>$addressbooks:$userstype:/</value>
+ </substitution>
+
+ <!-- primary addressbook name -->
+ <substitution>
+ <key>$addressbook:</key>
+ <value>addressbook</value>
+ </substitution>
+
+ <!-- directory name -->
+ <substitution>
+ <key>$directory:</key>
+ <value>$root:directory/</value>
+ </substitution>
+
+ <!-- POST add-member URI suffix -->
+ <substitution>
+ <key>$add-member:</key>
+ <value>;add-member</value>
+ </substitution>
+
+ <!-- user id for admin user -->
+ <substitution>
+ <key>$useradmin:</key>
+ <value>admin</value>
+ </substitution>
+ <!-- guid for admin user -->
+ <substitution>
+ <key>$useradminguid:</key>
+ <value>0C8BDE62-E600-4696-83D3-8B5ECABDFD2E</value>
+ </substitution>
+ <!-- password for admin user -->
+ <substitution>
+ <key>$pswdadmin:</key>
+ <value>admin</value>
+ </substitution>
+
+ <!-- relative path to admin principal resource-->
+ <substitution>
+ <key>$principal_admin:</key>
+ <value>$principals_users:$useradmin:/</value>
+ </substitution>
+ <substitution>
+ <key>$principaluri_admin:</key>
+ <value>$principals_uids:$useradminguid:/</value>
+ </substitution>
+
+ <!-- user id for apprentice user -->
+ <substitution>
+ <key>$userapprentice:</key>
+ <value>apprentice</value>
+ </substitution>
+ <!-- guid for apprentice user -->
+ <substitution>
+ <key>$userapprenticeguid:</key>
+ <value>29B6C503-11DF-43EC-8CCA-40C7003149CE</value>
+ </substitution>
+ <!-- password for admin user -->
+ <substitution>
+ <key>$pswdapprentice:</key>
+ <value>apprentice</value>
+ </substitution>
+
+ <!-- relative path to apprentice principal resource-->
+ <substitution>
+ <key>$principal_apprentice:</key>
+ <value>$principals_users:$userapprentice:/</value>
+ </substitution>
+ <substitution>
+ <key>$principaluri_apprentice:</key>
+ <value>$principals_uids:$userapprenticeguid:/</value>
+ </substitution>
+
+ <!-- user id for proxy user -->
+ <substitution>
+ <key>$userproxy:</key>
+ <value>superuser</value>
+ </substitution>
+ <!-- password for proxy user -->
+ <substitution>
+ <key>$pswdproxy:</key>
+ <value>superuser</value>
+ </substitution>
+
+ <!-- Forty user accounts -->
+ <repeat count="40">
+ <!-- user id -->
+ <substitution>
+ <key>$userid%d:</key>
+ <value>user%02d</value>
+ </substitution>
+ <!-- user guid -->
+ <substitution>
+ <key>$userguid%d:</key>
+ <value>10000000-0000-0000-0000-000000000%03d</value>
+ </substitution>
+ <!-- user name -->
+ <substitution>
+ <key>$username%d:</key>
+ <value>User %02d</value>
+ </substitution>
+ <!-- user name URI encoded -->
+ <substitution>
+ <key>$username-encoded%d:</key>
+ <value>User%%20%02d</value>
+ </substitution>
+ <!-- first name -->
+ <substitution>
+ <key>$firstname%d:</key>
+ <value>User</value>
+ </substitution>
+ <!-- last name -->
+ <substitution>
+ <key>$lastname%d:</key>
+ <value>%02d</value>
+ </substitution>
+ <!-- password -->
+ <substitution>
+ <key>$pswd%d:</key>
+ <value>user%02d</value>
+ </substitution>
+ <!-- relative path to user principal resource-->
+ <substitution>
+ <key>$principal%d:</key>
+ <value>$principals_users:$userid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$principaluri%d:</key>
+ <value>$principals_users:$userid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$principal%dnoslash:</key>
+ <value>$principals_users:$userid%d:</value>
+ </substitution>
+
+ <!-- relative path to user calendar home-->
+ <substitution>
+ <key>$calendarhome%d:</key>
+ <value>$calendars:$userid%d:</value>
+ </substitution>
+ <!-- relative path to user alternate calendar home-->
+ <substitution>
+ <key>$calendarhomealt%d:</key>
+ <value>$calendars_users:$userid%d:</value>
+ </substitution>
+ <!-- relative path to user calendar-->
+ <substitution>
+ <key>$calendarpath%d:</key>
+ <value>$calendarhome%d:/$calendar:</value>
+ </substitution>
+ <!-- relative path to user alternate calendar-->
+ <substitution>
+ <key>$calendarpathalt%d:</key>
+ <value>$calendarhomealt%d:/$calendar:</value>
+ </substitution>
+ <!-- relative path to user tasks calendar-->
+ <substitution>
+ <key>$taskspath%d:</key>
+ <value>$calendarhome%d:/$tasks:</value>
+ </substitution>
+ <!-- relative path to user polls calendar-->
+ <substitution>
+ <key>$pollspath%d:</key>
+ <value>$calendarhome%d:/$polls:</value>
+ </substitution>
+ <!-- relative path to user inbox-->
+ <substitution>
+ <key>$inboxpath%d:</key>
+ <value>$calendarhome%d:/$inbox:</value>
+ </substitution>
+ <!-- relative path to user outbox-->
+ <substitution>
+ <key>$outboxpath%d:</key>
+ <value>$calendarhome%d:/$outbox:</value>
+ </substitution>
+ <!-- relative path to user dropbox-->
+ <substitution>
+ <key>$dropboxpath%d:</key>
+ <value>$calendarhome%d:/$dropbox:</value>
+ </substitution>
+ <!-- relative path to user notification-->
+ <substitution>
+ <key>$notificationpath%d:</key>
+ <value>$calendarhome%d:/$notification:</value>
+ </substitution>
+ <!-- relative path to user freebusy-->
+ <substitution>
+ <key>$freebusypath%d:</key>
+ <value>$calendarhome%d:/$freebusy:</value>
+ </substitution>
+ <substitution>
+ <key>$email%d:</key>
+ <value>$userid%d:@example.com</value>
+ </substitution>
+ <!-- calendar user address of user-->
+ <substitution>
+ <key>$cuaddr%d:</key>
+ <value>mailto:$email%d:</value>
+ </substitution>
+ <substitution>
+ <key>$cuaddralt%d:</key>
+ <value>$cuaddr%d:</value>
+ </substitution>
+ <substitution>
+ <key>$cuaddraltnoslash%d:</key>
+ <value>$cuaddr%d:</value>
+ </substitution>
+ <substitution>
+ <key>$cuaddrurn%d:</key>
+ <value>urn:x-uid:$userguid%d:</value>
+ </substitution>
+
+ <!-- relative path to user addressbook home-->
+ <substitution>
+ <key>$addressbookhome%d:</key>
+ <value>$addressbooks:users/$userid%d:</value>
+ </substitution>
+ <!-- relative path to user addressbook-->
+ <substitution>
+ <key>$addressbookpath%d:</key>
+ <value>$addressbookhome%d:/$addressbook:</value>
+ </substitution>
+ </repeat>
+
+ <!-- Ten public accounts -->
+ <repeat count="10">
+ <!-- user id -->
+ <substitution>
+ <key>$publicuserid%d:</key>
+ <value>public%02d</value>
+ </substitution>
+ <!-- user guid -->
+ <substitution>
+ <key>$publicuserguid%d:</key>
+ <value>50000000-0000-0000-0000-0000000000%02d</value>
+ </substitution>
+ <!-- user name -->
+ <substitution>
+ <key>$publicusername%d:</key>
+ <value>Public %02d</value>
+ </substitution>
+ <!-- password -->
+ <substitution>
+ <key>$publicpswd%d:</key>
+ <value>public%02d</value>
+ </substitution>
+ <!-- relative path to user principal resource-->
+ <substitution>
+ <key>$publicprincipal%d:</key>
+ <value>$principals_users:$publicuserid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$publicprincipaluri%d:</key>
+ <value>$principals_uids:$publicuserguid%d:/</value>
+ </substitution>
+ <!-- relative path to user calendar home-->
+ <substitution>
+ <key>$publiccalendarhome%d:</key>
+ <value>$calendars_uids:$publicuserguid%d:</value>
+ </substitution>
+ <!-- relative path to user calendar-->
+ <substitution>
+ <key>$publiccalendarpath%d:</key>
+ <value>$calendars_uids:$publicuserguid%d:/$calendar:</value>
+ </substitution>
+ <substitution>
+ <key>$publicemail%d:</key>
+ <value>$publicuserid%d:@example.com</value>
+ </substitution>
+ <!-- calendar user address of user-->
+ <substitution>
+ <key>$publiccuaddr%d:</key>
+ <value>mailto:$publicemail%d:</value>
+ </substitution>
+ <substitution>
+ <key>$publiccuaddralt%d:</key>
+ <value>$publiccuaddr%d:</value>
+ </substitution>
+ <substitution>
+ <key>$publiccuaddrurn%d:</key>
+ <value>urn:x-uid:$publicuserguid%d:</value>
+ </substitution>
+ </repeat>
+
+ <!-- Twenty resource accounts -->
+ <repeat count="20">
+ <substitution>
+ <key>$resourceid%d:</key>
+ <value>resource%02d</value>
+ </substitution>
+ <!-- resource guid-->
+ <substitution>
+ <key>$resourceguid%d:</key>
+ <value>40000000-0000-0000-0000-000000000%03d</value>
+ </substitution>
+ <!-- resource name-->
+ <substitution>
+ <key>$resourcename%d:</key>
+ <value>Resource %02d</value>
+ </substitution>
+ <!-- relative path to first resource calendar home-->
+ <substitution>
+ <key>$rcalendarhome%d:</key>
+ <value>$calendars_uids:$resourceguid%d:</value>
+ </substitution>
+ <!-- relative path to first resource calendar home-->
+ <substitution>
+ <key>$rcalendarpath%d:</key>
+ <value>$calendars_uids:$resourceguid%d:/$calendar:</value>
+ </substitution>
+ <!-- relative path to first resource inbox-->
+ <substitution>
+ <key>$rinboxpath%d:</key>
+ <value>$calendars_uids:$resourceguid%d:/$inbox:</value>
+ </substitution>
+ <!-- relative path to first resource outbox-->
+ <substitution>
+ <key>$routboxpath%d:</key>
+ <value>$calendars_uids:$resourceguid%d:/$outbox:</value>
+ </substitution>
+ <!-- relative path to first resource principal resource-->
+ <substitution>
+ <key>$rprincipal%d:</key>
+ <value>$principals_resources:$resourceid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$rprincipaluri%d:</key>
+ <value>$principals_uids:$resourceguid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$rcuaddralt%d:</key>
+ <value>$rcuaddrurn%d:</value>
+ </substitution>
+ <substitution>
+ <key>$rcuaddrurn%d:</key>
+ <value>urn:x-uid:$resourceguid%d:</value>
+ </substitution>
+ </repeat>
+
+ <!-- Ten Location accounts -->
+ <repeat count="10">
+ <substitution>
+ <key>$locationid%d:</key>
+ <value>location%02d</value>
+ </substitution>
+ <!-- location guid-->
+ <substitution>
+ <key>$locationguid%d:</key>
+ <value>30000000-0000-0000-0000-000000000%03d</value>
+ </substitution>
+ <!-- location name-->
+ <substitution>
+ <key>$locationname%d:</key>
+ <value>Location %02d</value>
+ </substitution>
+ <!-- relative path to first location calendar home-->
+ <substitution>
+ <key>$lcalendarhome%d:</key>
+ <value>$calendars_uids:$locationguid%d:</value>
+ </substitution>
+ <!-- relative path to first location calendar home-->
+ <substitution>
+ <key>$lcalendarpath%d:</key>
+ <value>$calendars_uids:$locationguid%d:/$calendar:</value>
+ </substitution>
+ <!-- relative path to first location inbox-->
+ <substitution>
+ <key>$linboxpath%d:</key>
+ <value>$calendars_uids:$locationguid%d:/$inbox:</value>
+ </substitution>
+ <!-- relative path to first location outbox-->
+ <substitution>
+ <key>$loutboxpath%d:</key>
+ <value>$calendars_uids:$locationguid%d:/$outbox:</value>
+ </substitution>
+ <!-- relative path to first location principal resource-->
+ <substitution>
+ <key>$lprincipal%d:</key>
+ <value>$principals_resources:$locationid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$lprincipaluri%d:</key>
+ <value>$principals_uids:$locationguid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$lcuaddralt%d:</key>
+ <value>$lprincipaluri%d:</value>
+ </substitution>
+ <substitution>
+ <key>$lcuaddrurn%d:</key>
+ <value>urn:x-uid:$locationguid%d:</value>
+ </substitution>
+ </repeat>
+
+
+ <!-- Ten Group accounts -->
+ <repeat count="40">
+ <substitution>
+ <key>$groupid%d:</key>
+ <value>group%02d</value>
+ </substitution>
+ <!-- group guid-->
+ <substitution>
+ <key>$groupguid%d:</key>
+ <value>20000000-0000-0000-0000-000000000%03d</value>
+ </substitution>
+ <!-- group name-->
+ <substitution>
+ <key>$groupname%d:</key>
+ <value>Group %02d</value>
+ </substitution>
+ <!-- relative path to first group principal resource-->
+ <substitution>
+ <key>$gprincipal%d:</key>
+ <value>$principals_resources:$groupid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$gprincipaluri%d:</key>
+ <value>$principals_uids:$groupguid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$gemail%d:</key>
+ <value>$groupid%d:@example.com</value>
+ </substitution>
+ <substitution>
+ <key>$gcuaddralt%d:</key>
+ <value>$gprincipaluri%d:</value>
+ </substitution>
+ <substitution>
+ <key>$gcuaddrurn%d:</key>
+ <value>urn:x-uid:$groupguid%d:</value>
+ </substitution>
+ </repeat>
+
+ <!-- User with non-ascii name -->
+ <substitution>
+ <key>$i18nid:</key>
+ <value>i18nuser</value>
+ </substitution>
+ <!-- group guid-->
+ <substitution>
+ <key>$i18nguid:</key>
+ <value>860B3EE9-6D7C-4296-9639-E6B998074A78</value>
+ </substitution>
+ <!-- group name-->
+ <substitution>
+ <key>$i18nname:</key>
+ <value>まだ</value>
+ </substitution>
+ <!-- password -->
+ <substitution>
+ <key>$i18npswd:</key>
+ <value>i18nuser</value>
+ </substitution>
+ <!-- relative path to user calendar-->
+ <substitution>
+ <key>$i18ncalendarpath:</key>
+ <value>$calendars_uids:$i18nguid:/$calendar:</value>
+ </substitution>
+ <substitution>
+ <key>$i18nemail:</key>
+ <value>$i18nid:@example.com</value>
+ </substitution>
+ <!-- CUAddrs -->
+ <substitution>
+ <key>$i18ncuaddr:</key>
+ <value>mailto:$i18nemail:</value>
+ </substitution>
+ <substitution>
+ <key>$i18ncuaddrurn:</key>
+ <value>urn:x-uid:$i18nguid:</value>
+ </substitution>
+
+ <!-- relative path to disabled group principal resource-->
+ <substitution>
+ <key>$principaldisabled:</key>
+ <value>$principals_groups:disabledgroup/</value>
+ </substitution>
+ <substitution>
+ <key>$principaluridisabled:</key>
+ <value>$principals_uids:disabledgroup/</value>
+ </substitution>
+ <!-- calendar user address of disabled group-->
+ <substitution>
+ <key>$cuaddrdisabled:</key>
+ <value>$principals_uids:disabledgroup/</value>
+ </substitution>
+
+ <!-- Override some of the above definitions for special cases -->
+
+ <!-- calendar user address of second user-->
+ <substitution>
+ <key>$cuaddr2:</key>
+ <value>MAILTO:$email2:</value>
+ </substitution>
+
+ </substitutions>
+</serverinfo>
diff --git a/apps/dav/tests/testsuits/caldavtest/serverinfo-old-caldav-endpoint.xml b/apps/dav/tests/testsuits/caldavtest/serverinfo-old-caldav-endpoint.xml
new file mode 100644
index 00000000000..c95efd2ca0d
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/serverinfo-old-caldav-endpoint.xml
@@ -0,0 +1,838 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE serverinfo SYSTEM "./serverinfo.dtd">
+
+<!--
+ - SPDX-FileCopyrightText: 2006-2015 Apple Inc. All rights reserved.
+ - SPDX-License-Identifier: Apache-2.0
+-->
+
+<serverinfo>
+ <host>localhost</host>
+ <nonsslport>8888</nonsslport>
+ <authtype>basic</authtype>
+ <!-- <unix>/tmp/caldavd_requests/unsecured.sock</unix> -->
+
+ <waitcount>120</waitcount>
+ <waitdelay>0.25</waitdelay>
+ <waitsuccess>30</waitsuccess>
+
+ <features>
+ <!-- Generic WebDAV extensions -->
+ <feature>COPY Method</feature> <!-- COPY method -->
+ <feature>MOVE Method</feature> <!-- MOVE method -->
+ <feature>Extended MKCOL</feature> <!-- Extended MKCOL -->
+
+ <!-- ACL related -->
+ <feature>ACL Method</feature> <!-- ACL method -->
+ <feature>acl-principal-prop-set REPORT</feature> <!-- ACL acl-principal-prop-set REPORT -->
+ <feature>principal-match REPORT</feature> <!-- ACL principal-match REPORT -->
+ <feature>principal-property-search REPORT</feature> <!-- ACL principal-property-search REPORT -->
+ <feature>principal-search-property-set REPORT</feature> <!-- ACL principal-search-property-set REPORT -->
+ <feature>calendarserver-principal-search REPORT</feature> <!-- ACL calendarserver-principal-search REPORT -->
+
+ <feature>add-member</feature> <!-- Add-member used to create resources -->
+ <!-- <feature>auth-on-root</feature> --> <!-- Whether the server requires authentication on the root URI -->
+ <feature>brief</feature> <!-- Brief header for PROPFIND, REPORT -->
+ <feature>bulk-post</feature> <!-- Bulk POST requests -->
+ <feature>ctag</feature> <!-- ctag extension -->
+ <feature>current-user-principal</feature> <!-- current-user-principal extension -->
+ <feature>directory listing</feature> <!-- GET on collection -->
+ <feature>extended-principal-search</feature> <!-- Extended principal-property-search REPORT extension -->
+ <feature>expand-property</feature> <!-- Expand property REPORT -->
+ <feature>only-proxy-groups</feature> <!-- Group-membership only includes delegated-to groups -->
+ <feature>limits</feature> <!-- max-collections and max-resources limits -->
+ <feature>own-root</feature> <!-- / is owned by this service -->
+ <feature>prefer</feature> <!-- Prefer header overall support -->
+ <feature>prefer-minimal</feature> <!-- Prefer header return=minimal -->
+ <feature>prefer-representation</feature> <!-- Prefer header return=representation -->
+ <feature>prefer-noroot</feature> <!-- Prefer header depth-noroot -->
+ <feature>quota</feature> <!-- WebDAV QUOTA -->
+ <!-- <feature>quota-on-resources</feature> --> <!-- WebDAV QUOTA on calendar and address book object resources -->
+ <feature>resource-id</feature> <!-- WebDAV BIND DAV:resource-id property -->
+ <feature>sync-report</feature> <!-- WebDAV collection sync REPORT -->
+ <!-- <feature>sync-report-limit</feature> --> <!-- WebDAV collection sync REPORT DAV:limit support -->
+ <!--<feature>sync-report-home</feature> &lt;!&ndash; WebDAV collection sync REPORT on Homes &ndash;&gt;-->
+ <feature>sync-report-config-token</feature> <!-- Sync REPORT token includes configuration component -->
+ <feature>well-known</feature> <!-- well-known feature -->
+
+ <!-- <feature>per-object-ACLs</feature> --> <!-- ACL for objects in calendar/address books -->
+ <!-- <feature>regular-collection</feature> --> <!-- Regular collections allowed in calendar/address book homes -->
+
+ <feature>json-data</feature> <!-- jCal and jCard support -->
+
+ <!-- CalendarServer specific extensions -->
+ <feature>control-api</feature> <!-- Control API support -->
+
+ <!-- CalDAV specific extension -->
+ <feature>caldav</feature> <!-- Basic CalDAV feature enabler -->
+ <feature>attachments-collection</feature> <!-- Server uses a collection in same WebDAV tree to store attachments -->
+ <feature>auto-accept</feature> <!-- Auto-accept for rooms & locations -->
+ <feature>auto-accept-modes</feature> <!-- Auto-accept modes -->
+ <feature>client-fix-TRANSP</feature> <!-- fix client TRANSP -->
+ <!-- <feature>dropbox</feature> --> <!-- dropbox extension -->
+ <feature>default-alarms</feature> <!-- default alarms extension -->
+ <feature>EMAIL parameter</feature> <!-- Server normalizes cuaddress and adds EMAIL parameter -->
+ <feature>extended-freebusy</feature> <!-- Extended freebusy response -->
+ <feature>freebusy-url</feature> <!-- Freebusy URL -->
+ <feature>group-attendee-expansion</feature> <!-- Auto-expansion of group attendees -->
+ <feature>implicit-scheduling</feature> <!-- CalDAV scheduling - implicit -->
+ <feature>location-resource-tracking</feature> <!-- Server tracks who makes unscheduled changes to locations and resources -->
+ <feature>managed-attachments</feature> <!-- CalDAV Managed Attachments -->
+ <feature>maskuid</feature> <!-- maskuid extension -->
+ <feature>no-duplicate-uids</feature> <!-- duplicate UIDs in same home not supported -->
+ <feature>partstat-timestamp</feature> <!-- Time stamps when PARTSTAT changes extension -->
+ <!-- <feature>podding</feature> --> <!-- Podded server -->
+ <feature>private-comments</feature> <!-- private-comments extension -->
+ <feature>private-events</feature> <!-- private-events extension -->
+ <feature>proxy</feature> <!-- calendar-user-proxy extension -->
+ <!-- <feature>proxy-authz</feature> --> <!-- sudo user extension -->
+ <feature>recurrence-splitting</feature> <!-- Recurring components can be split -->
+ <feature>remove-duplicate-alarms</feature> <!-- Server removes any duplicate alarms on PUT -->
+ <feature>query-extended</feature> <!-- calendar-query-extended extension -->
+ <feature>shared-calendars</feature> <!-- Shared calendars extension -->
+ <feature>share-calendars-to-groups</feature> <!-- Share calendars to groups extension -->
+ <feature>schedule-changes</feature> <!-- schedule-changes property extension -->
+ <feature>split-calendars</feature> <!-- Calendars are split by component type -->
+ <feature>supported-component-sets</feature> <!-- CALDAV:supported-calendar-component-sets on calendar homes -->
+ <feature>supported-component-sets-one</feature> <!-- Only single component calendars allowed to be created -->
+ <feature>timerange-low-limit</feature> <!-- Time-range only valid one year back -->
+ <feature>timerange-high-limit</feature> <!-- Time-range only valid 5 years ahead -->
+ <feature>timezones-by-reference</feature> <!-- Timezones by reference enabled -->
+ <feature>timezone-service</feature> <!-- Timezone service extension for Wiki -->
+ <feature>timezone-std-service</feature> <!-- Timezone standard service extension -->
+ <!-- <feature>trash-collection</feature> --> <!-- Trash collection enabled -->
+ <feature>travel-time-busy</feature> <!-- Travel time appears as busy -->
+ <feature>vavailability</feature> <!-- VAVAILABILITY on inbox -->
+ <!-- <feature>vpoll</feature> --> <!-- VPOLL support for store and scheduling -->
+ <feature>webcal</feature> <!-- Internet calendar subscription via GET on calendar collection -->
+
+ <!-- CardDAV specific extension -->
+ <feature>carddav</feature> <!-- Basic CardDAV feature enabler -->
+ <feature>default-addressbook</feature> <!-- Default address book behavior -->
+ <feature>shared-addressbooks</feature> <!-- Shared address books extension -->
+ <feature>shared-addressbook-groups</feature> <!-- Shared address book groups extension -->
+ <feature>directory-gateway</feature> <!-- Directory gateway extension -->
+
+ </features>
+
+ <substitutions>
+ <!-- Useful xpath shortcuts for verifiers -->
+ <substitution>
+ <key>$multistatus-response-prefix:</key>
+ <value>/{DAV:}multistatus/{DAV:}response</value>
+ </substitution>
+ <substitution>
+ <key>$multistatus-href-prefix:</key>
+ <value>/{DAV:}multistatus/{DAV:}response/{DAV:}href</value>
+ </substitution>
+ <substitution>
+ <key>$verify-response-prefix:</key>
+ <value>{DAV:}response/{DAV:}propstat/{DAV:}prop</value>
+ </substitution>
+ <substitution>
+ <key>$verify-property-prefix:</key>
+ <value>/{DAV:}multistatus/{DAV:}response/{DAV:}propstat/{DAV:}prop</value>
+ </substitution>
+ <substitution>
+ <key>$verify-bad-response:</key>
+ <value>/{DAV:}multistatus/{DAV:}response/{DAV:}status</value>
+ </substitution>
+ <substitution>
+ <key>$verify-error-response:</key>
+ <value>/{DAV:}multistatus/{DAV:}response/{DAV:}error</value>
+ </substitution>
+ <substitution>
+ <key>$CALDAV:</key>
+ <value>urn:ietf:params:xml:ns:caldav</value>
+ </substitution>
+ <substitution>
+ <key>$CARDDAV:</key>
+ <value>urn:ietf:params:xml:ns:carddav</value>
+ </substitution>
+ <substitution>
+ <key>$CS:</key>
+ <value>http://calendarserver.org/ns/</value>
+ </substitution>
+
+ <!-- Server configuration settings -->
+ <!-- $host: and $hostssl: are implicitly added by CalDAVTester based
+ on the host/nonsslport/sslport values and ssl command line switch -->
+
+ <!-- relative path to caldav root-->
+ <substitution>
+ <key>$root:</key>
+ <value>/remote.php/caldav/</value>
+ </substitution>
+
+ <!-- relative path to main principal collection-->
+ <substitution>
+ <key>$principalcollection:</key>
+ <value>$root:principals/</value>
+ </substitution>
+
+ <!-- the core record type collections-->
+ <substitution>
+ <key>$uidstype:</key>
+ <value>__uids__</value>
+ </substitution>
+ <substitution>
+ <key>$groupstype:</key>
+ <value>groups</value>
+ </substitution>
+ <substitution>
+ <key>$locationstype:</key>
+ <value>locations</value>
+ </substitution>
+ <substitution>
+ <key>$resourcestype:</key>
+ <value>resources</value>
+ </substitution>
+
+ <!-- relative path to record type principal collections-->
+ <substitution>
+ <key>$principals_uids:</key>
+ <value>$principalcollection:$uidstype:/</value>
+ </substitution>
+ <substitution>
+ <key>$principals_users:</key>
+ <value>$principalcollection:</value>
+ </substitution>
+ <substitution>
+ <key>$principals_groups:</key>
+ <value>$principalcollection:$groupstype:/</value>
+ </substitution>
+ <substitution>
+ <key>$principals_resources:</key>
+ <value>$principalcollection:$resourcestype:/</value>
+ </substitution>
+ <substitution>
+ <key>$principals_locations:</key>
+ <value>$principalcollection:$locationstype:/</value>
+ </substitution>
+
+ <!-- relative path to calendars collection-->
+ <substitution>
+ <key>$calendars:</key>
+ <value>$root:calendars/</value>
+ </substitution>
+
+ <!-- relative path to record type calendar collections-->
+ <substitution>
+ <key>$calendars_uids:</key>
+ <value>$calendars:$uidstype:/</value>
+ </substitution>
+ <substitution>
+ <key>$calendars_users:</key>
+ <value>$calendars:/</value>
+ </substitution>
+ <substitution>
+ <key>$calendars_resources:</key>
+ <value>$calendars:$resourcestype:/</value>
+ </substitution>
+ <substitution>
+ <key>$calendars_locations:</key>
+ <value>$calendars:$locationstype:/</value>
+ </substitution>
+
+ <!-- primary calendar name-->
+ <substitution>
+ <key>$calendar:</key>
+ <value>calendar</value>
+ </substitution>
+
+ <!-- primary tasks-only calendar name-->
+ <substitution>
+ <key>$tasks:</key>
+ <value>tasks</value>
+ </substitution>
+
+ <!-- primary polls-only calendar name-->
+ <substitution>
+ <key>$polls:</key>
+ <value>polls</value>
+ </substitution>
+
+ <!-- inbox name-->
+ <substitution>
+ <key>$inbox:</key>
+ <value>inbox</value>
+ </substitution>
+
+ <!-- outbox name-->
+ <substitution>
+ <key>$outbox:</key>
+ <value>outbox</value>
+ </substitution>
+
+ <!-- dropbox name-->
+ <substitution>
+ <key>$dropbox:</key>
+ <value>dropbox</value>
+ </substitution>
+
+ <!-- attachments name-->
+ <substitution>
+ <key>$attachments:</key>
+ <value>dropbox</value>
+ </substitution>
+
+ <!-- notification name-->
+ <substitution>
+ <key>$notification:</key>
+ <value>notification</value>
+ </substitution>
+
+ <!-- freebusy name-->
+ <substitution>
+ <key>$freebusy:</key>
+ <value>freebusy</value>
+ </substitution>
+
+ <!-- Sync home collection items - use "-" to include the home resource-->
+ <substitution>
+ <key>$calendar_home_items_initial_sync:</key>
+ <value>[-,$calendar:/,$tasks:/,$inbox:/,$outbox:/,$freebusy:,$notification:/]</value>
+ </substitution>
+
+ <!-- Sync collection extra items - use "-" to include the collection-->
+ <substitution>
+ <key>$calendar_sync_extra_items:</key>
+ <value>[-]</value>
+ </substitution>
+
+ <!-- Sync collection extra count - gets added to the totalcount value-->
+ <substitution>
+ <key>$calendar_sync_extra_count:</key>
+ <value>1</value> <!-- the request-uri resource is returned when no token passed-->
+ </substitution>
+
+ <!-- server-to-server inbox-->
+ <substitution>
+ <key>$servertoserver:</key>
+ <value>$root:inbox</value>
+ </substitution>
+
+ <!-- timezone service-->
+ <substitution>
+ <key>$timezoneservice:</key>
+ <value>$root:timezones</value>
+ </substitution>
+
+ <!-- timezone std service-->
+ <substitution>
+ <key>$timezonestdservice:</key>
+ <value>$root:stdtimezones</value>
+ </substitution>
+
+ <!-- relative path to addressbooks collection-->
+ <substitution>
+ <key>$addressbooks:</key>
+ <value>$root:addressbooks/</value>
+ </substitution>
+
+ <!-- relative path to record type addressbook collections-->
+ <substitution>
+ <key>$addressbooks_uids:</key>
+ <value>$addressbooks:$uidstype:/</value>
+ </substitution>
+ <substitution>
+ <key>$addressbooks_users:</key>
+ <value>$addressbooks:/</value>
+ </substitution>
+
+ <!-- primary addressbook name -->
+ <substitution>
+ <key>$addressbook:</key>
+ <value>addressbook</value>
+ </substitution>
+
+ <!-- directory name -->
+ <substitution>
+ <key>$directory:</key>
+ <value>$root:directory/</value>
+ </substitution>
+
+ <!-- POST add-member URI suffix -->
+ <substitution>
+ <key>$add-member:</key>
+ <value>;add-member</value>
+ </substitution>
+
+ <!-- user id for admin user -->
+ <substitution>
+ <key>$useradmin:</key>
+ <value>admin</value>
+ </substitution>
+ <!-- guid for admin user -->
+ <substitution>
+ <key>$useradminguid:</key>
+ <value>0C8BDE62-E600-4696-83D3-8B5ECABDFD2E</value>
+ </substitution>
+ <!-- password for admin user -->
+ <substitution>
+ <key>$pswdadmin:</key>
+ <value>admin</value>
+ </substitution>
+
+ <!-- relative path to admin principal resource-->
+ <substitution>
+ <key>$principal_admin:</key>
+ <value>$principals_users:$useradmin:/</value>
+ </substitution>
+ <substitution>
+ <key>$principaluri_admin:</key>
+ <value>$principals_uids:$useradminguid:/</value>
+ </substitution>
+
+ <!-- user id for apprentice user -->
+ <substitution>
+ <key>$userapprentice:</key>
+ <value>apprentice</value>
+ </substitution>
+ <!-- guid for apprentice user -->
+ <substitution>
+ <key>$userapprenticeguid:</key>
+ <value>29B6C503-11DF-43EC-8CCA-40C7003149CE</value>
+ </substitution>
+ <!-- password for admin user -->
+ <substitution>
+ <key>$pswdapprentice:</key>
+ <value>apprentice</value>
+ </substitution>
+
+ <!-- relative path to apprentice principal resource-->
+ <substitution>
+ <key>$principal_apprentice:</key>
+ <value>$principals_users:$userapprentice:/</value>
+ </substitution>
+ <substitution>
+ <key>$principaluri_apprentice:</key>
+ <value>$principals_uids:$userapprenticeguid:/</value>
+ </substitution>
+
+ <!-- user id for proxy user -->
+ <substitution>
+ <key>$userproxy:</key>
+ <value>superuser</value>
+ </substitution>
+ <!-- password for proxy user -->
+ <substitution>
+ <key>$pswdproxy:</key>
+ <value>superuser</value>
+ </substitution>
+
+ <!-- Forty user accounts -->
+ <repeat count="40">
+ <!-- user id -->
+ <substitution>
+ <key>$userid%d:</key>
+ <value>user%02d</value>
+ </substitution>
+ <!-- user guid -->
+ <substitution>
+ <key>$userguid%d:</key>
+ <value>10000000-0000-0000-0000-000000000%03d</value>
+ </substitution>
+ <!-- user name -->
+ <substitution>
+ <key>$username%d:</key>
+ <value>User %02d</value>
+ </substitution>
+ <!-- user name URI encoded -->
+ <substitution>
+ <key>$username-encoded%d:</key>
+ <value>User%%20%02d</value>
+ </substitution>
+ <!-- first name -->
+ <substitution>
+ <key>$firstname%d:</key>
+ <value>User</value>
+ </substitution>
+ <!-- last name -->
+ <substitution>
+ <key>$lastname%d:</key>
+ <value>%02d</value>
+ </substitution>
+ <!-- password -->
+ <substitution>
+ <key>$pswd%d:</key>
+ <value>user%02d</value>
+ </substitution>
+ <!-- relative path to user principal resource-->
+ <substitution>
+ <key>$principal%d:</key>
+ <value>$principals_users:$userid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$principaluri%d:</key>
+ <value>$principals_users:$userid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$principal%dnoslash:</key>
+ <value>$principals_users:$userid%d:</value>
+ </substitution>
+
+ <!-- relative path to user calendar home-->
+ <substitution>
+ <key>$calendarhome%d:</key>
+ <value>$calendars:$userid%d:</value>
+ </substitution>
+ <!-- relative path to user alternate calendar home-->
+ <substitution>
+ <key>$calendarhomealt%d:</key>
+ <value>$calendars_users:$userid%d:</value>
+ </substitution>
+ <!-- relative path to user calendar-->
+ <substitution>
+ <key>$calendarpath%d:</key>
+ <value>$calendarhome%d:/$calendar:</value>
+ </substitution>
+ <!-- relative path to user alternate calendar-->
+ <substitution>
+ <key>$calendarpathalt%d:</key>
+ <value>$calendarhomealt%d:/$calendar:</value>
+ </substitution>
+ <!-- relative path to user tasks calendar-->
+ <substitution>
+ <key>$taskspath%d:</key>
+ <value>$calendarhome%d:/$tasks:</value>
+ </substitution>
+ <!-- relative path to user polls calendar-->
+ <substitution>
+ <key>$pollspath%d:</key>
+ <value>$calendarhome%d:/$polls:</value>
+ </substitution>
+ <!-- relative path to user inbox-->
+ <substitution>
+ <key>$inboxpath%d:</key>
+ <value>$calendarhome%d:/$inbox:</value>
+ </substitution>
+ <!-- relative path to user outbox-->
+ <substitution>
+ <key>$outboxpath%d:</key>
+ <value>$calendarhome%d:/$outbox:</value>
+ </substitution>
+ <!-- relative path to user dropbox-->
+ <substitution>
+ <key>$dropboxpath%d:</key>
+ <value>$calendarhome%d:/$dropbox:</value>
+ </substitution>
+ <!-- relative path to user notification-->
+ <substitution>
+ <key>$notificationpath%d:</key>
+ <value>$calendarhome%d:/$notification:</value>
+ </substitution>
+ <!-- relative path to user freebusy-->
+ <substitution>
+ <key>$freebusypath%d:</key>
+ <value>$calendarhome%d:/$freebusy:</value>
+ </substitution>
+ <substitution>
+ <key>$email%d:</key>
+ <value>$userid%d:@example.com</value>
+ </substitution>
+ <!-- calendar user address of user-->
+ <substitution>
+ <key>$cuaddr%d:</key>
+ <value>mailto:$email%d:</value>
+ </substitution>
+ <substitution>
+ <key>$cuaddralt%d:</key>
+ <value>$cuaddr%d:</value>
+ </substitution>
+ <substitution>
+ <key>$cuaddraltnoslash%d:</key>
+ <value>$cuaddr%d:</value>
+ </substitution>
+ <substitution>
+ <key>$cuaddrurn%d:</key>
+ <value>urn:x-uid:$userguid%d:</value>
+ </substitution>
+
+ <!-- relative path to user addressbook home-->
+ <substitution>
+ <key>$addressbookhome%d:</key>
+ <value>$addressbooks:users/$userid%d:</value>
+ </substitution>
+ <!-- relative path to user addressbook-->
+ <substitution>
+ <key>$addressbookpath%d:</key>
+ <value>$addressbookhome%d:/$addressbook:</value>
+ </substitution>
+ </repeat>
+
+ <!-- Ten public accounts -->
+ <repeat count="10">
+ <!-- user id -->
+ <substitution>
+ <key>$publicuserid%d:</key>
+ <value>public%02d</value>
+ </substitution>
+ <!-- user guid -->
+ <substitution>
+ <key>$publicuserguid%d:</key>
+ <value>50000000-0000-0000-0000-0000000000%02d</value>
+ </substitution>
+ <!-- user name -->
+ <substitution>
+ <key>$publicusername%d:</key>
+ <value>Public %02d</value>
+ </substitution>
+ <!-- password -->
+ <substitution>
+ <key>$publicpswd%d:</key>
+ <value>public%02d</value>
+ </substitution>
+ <!-- relative path to user principal resource-->
+ <substitution>
+ <key>$publicprincipal%d:</key>
+ <value>$principals_users:$publicuserid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$publicprincipaluri%d:</key>
+ <value>$principals_uids:$publicuserguid%d:/</value>
+ </substitution>
+ <!-- relative path to user calendar home-->
+ <substitution>
+ <key>$publiccalendarhome%d:</key>
+ <value>$calendars_uids:$publicuserguid%d:</value>
+ </substitution>
+ <!-- relative path to user calendar-->
+ <substitution>
+ <key>$publiccalendarpath%d:</key>
+ <value>$calendars_uids:$publicuserguid%d:/$calendar:</value>
+ </substitution>
+ <substitution>
+ <key>$publicemail%d:</key>
+ <value>$publicuserid%d:@example.com</value>
+ </substitution>
+ <!-- calendar user address of user-->
+ <substitution>
+ <key>$publiccuaddr%d:</key>
+ <value>mailto:$publicemail%d:</value>
+ </substitution>
+ <substitution>
+ <key>$publiccuaddralt%d:</key>
+ <value>$publiccuaddr%d:</value>
+ </substitution>
+ <substitution>
+ <key>$publiccuaddrurn%d:</key>
+ <value>urn:x-uid:$publicuserguid%d:</value>
+ </substitution>
+ </repeat>
+
+ <!-- Twenty resource accounts -->
+ <repeat count="20">
+ <substitution>
+ <key>$resourceid%d:</key>
+ <value>resource%02d</value>
+ </substitution>
+ <!-- resource guid-->
+ <substitution>
+ <key>$resourceguid%d:</key>
+ <value>40000000-0000-0000-0000-000000000%03d</value>
+ </substitution>
+ <!-- resource name-->
+ <substitution>
+ <key>$resourcename%d:</key>
+ <value>Resource %02d</value>
+ </substitution>
+ <!-- relative path to first resource calendar home-->
+ <substitution>
+ <key>$rcalendarhome%d:</key>
+ <value>$calendars_uids:$resourceguid%d:</value>
+ </substitution>
+ <!-- relative path to first resource calendar home-->
+ <substitution>
+ <key>$rcalendarpath%d:</key>
+ <value>$calendars_uids:$resourceguid%d:/$calendar:</value>
+ </substitution>
+ <!-- relative path to first resource inbox-->
+ <substitution>
+ <key>$rinboxpath%d:</key>
+ <value>$calendars_uids:$resourceguid%d:/$inbox:</value>
+ </substitution>
+ <!-- relative path to first resource outbox-->
+ <substitution>
+ <key>$routboxpath%d:</key>
+ <value>$calendars_uids:$resourceguid%d:/$outbox:</value>
+ </substitution>
+ <!-- relative path to first resource principal resource-->
+ <substitution>
+ <key>$rprincipal%d:</key>
+ <value>$principals_resources:$resourceid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$rprincipaluri%d:</key>
+ <value>$principals_uids:$resourceguid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$rcuaddralt%d:</key>
+ <value>$rcuaddrurn%d:</value>
+ </substitution>
+ <substitution>
+ <key>$rcuaddrurn%d:</key>
+ <value>urn:x-uid:$resourceguid%d:</value>
+ </substitution>
+ </repeat>
+
+ <!-- Ten Location accounts -->
+ <repeat count="10">
+ <substitution>
+ <key>$locationid%d:</key>
+ <value>location%02d</value>
+ </substitution>
+ <!-- location guid-->
+ <substitution>
+ <key>$locationguid%d:</key>
+ <value>30000000-0000-0000-0000-000000000%03d</value>
+ </substitution>
+ <!-- location name-->
+ <substitution>
+ <key>$locationname%d:</key>
+ <value>Location %02d</value>
+ </substitution>
+ <!-- relative path to first location calendar home-->
+ <substitution>
+ <key>$lcalendarhome%d:</key>
+ <value>$calendars_uids:$locationguid%d:</value>
+ </substitution>
+ <!-- relative path to first location calendar home-->
+ <substitution>
+ <key>$lcalendarpath%d:</key>
+ <value>$calendars_uids:$locationguid%d:/$calendar:</value>
+ </substitution>
+ <!-- relative path to first location inbox-->
+ <substitution>
+ <key>$linboxpath%d:</key>
+ <value>$calendars_uids:$locationguid%d:/$inbox:</value>
+ </substitution>
+ <!-- relative path to first location outbox-->
+ <substitution>
+ <key>$loutboxpath%d:</key>
+ <value>$calendars_uids:$locationguid%d:/$outbox:</value>
+ </substitution>
+ <!-- relative path to first location principal resource-->
+ <substitution>
+ <key>$lprincipal%d:</key>
+ <value>$principals_resources:$locationid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$lprincipaluri%d:</key>
+ <value>$principals_uids:$locationguid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$lcuaddralt%d:</key>
+ <value>$lprincipaluri%d:</value>
+ </substitution>
+ <substitution>
+ <key>$lcuaddrurn%d:</key>
+ <value>urn:x-uid:$locationguid%d:</value>
+ </substitution>
+ </repeat>
+
+
+ <!-- Ten Group accounts -->
+ <repeat count="40">
+ <substitution>
+ <key>$groupid%d:</key>
+ <value>group%02d</value>
+ </substitution>
+ <!-- group guid-->
+ <substitution>
+ <key>$groupguid%d:</key>
+ <value>20000000-0000-0000-0000-000000000%03d</value>
+ </substitution>
+ <!-- group name-->
+ <substitution>
+ <key>$groupname%d:</key>
+ <value>Group %02d</value>
+ </substitution>
+ <!-- relative path to first group principal resource-->
+ <substitution>
+ <key>$gprincipal%d:</key>
+ <value>$principals_resources:$groupid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$gprincipaluri%d:</key>
+ <value>$principals_uids:$groupguid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$gemail%d:</key>
+ <value>$groupid%d:@example.com</value>
+ </substitution>
+ <substitution>
+ <key>$gcuaddralt%d:</key>
+ <value>$gprincipaluri%d:</value>
+ </substitution>
+ <substitution>
+ <key>$gcuaddrurn%d:</key>
+ <value>urn:x-uid:$groupguid%d:</value>
+ </substitution>
+ </repeat>
+
+ <!-- User with non-ascii name -->
+ <substitution>
+ <key>$i18nid:</key>
+ <value>i18nuser</value>
+ </substitution>
+ <!-- group guid-->
+ <substitution>
+ <key>$i18nguid:</key>
+ <value>860B3EE9-6D7C-4296-9639-E6B998074A78</value>
+ </substitution>
+ <!-- group name-->
+ <substitution>
+ <key>$i18nname:</key>
+ <value>まだ</value>
+ </substitution>
+ <!-- password -->
+ <substitution>
+ <key>$i18npswd:</key>
+ <value>i18nuser</value>
+ </substitution>
+ <!-- relative path to user calendar-->
+ <substitution>
+ <key>$i18ncalendarpath:</key>
+ <value>$calendars_uids:$i18nguid:/$calendar:</value>
+ </substitution>
+ <substitution>
+ <key>$i18nemail:</key>
+ <value>$i18nid:@example.com</value>
+ </substitution>
+ <!-- CUAddrs -->
+ <substitution>
+ <key>$i18ncuaddr:</key>
+ <value>mailto:$i18nemail:</value>
+ </substitution>
+ <substitution>
+ <key>$i18ncuaddrurn:</key>
+ <value>urn:x-uid:$i18nguid:</value>
+ </substitution>
+
+ <!-- relative path to disabled group principal resource-->
+ <substitution>
+ <key>$principaldisabled:</key>
+ <value>$principals_groups:disabledgroup/</value>
+ </substitution>
+ <substitution>
+ <key>$principaluridisabled:</key>
+ <value>$principals_uids:disabledgroup/</value>
+ </substitution>
+ <!-- calendar user address of disabled group-->
+ <substitution>
+ <key>$cuaddrdisabled:</key>
+ <value>$principals_uids:disabledgroup/</value>
+ </substitution>
+
+ <!-- Override some of the above definitions for special cases -->
+
+ <!-- calendar user address of second user-->
+ <substitution>
+ <key>$cuaddr2:</key>
+ <value>MAILTO:$email2:</value>
+ </substitution>
+
+ </substitutions>
+</serverinfo>
diff --git a/apps/dav/tests/testsuits/caldavtest/serverinfo-old-carddav-endpoint.xml b/apps/dav/tests/testsuits/caldavtest/serverinfo-old-carddav-endpoint.xml
new file mode 100644
index 00000000000..960cc8cdf17
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/serverinfo-old-carddav-endpoint.xml
@@ -0,0 +1,838 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE serverinfo SYSTEM "./serverinfo.dtd">
+
+<!--
+ - SPDX-FileCopyrightText: 2006-2015 Apple Inc. All rights reserved.
+ - SPDX-License-Identifier: Apache-2.0
+-->
+
+<serverinfo>
+ <host>localhost</host>
+ <nonsslport>8888</nonsslport>
+ <authtype>basic</authtype>
+ <!-- <unix>/tmp/caldavd_requests/unsecured.sock</unix> -->
+
+ <waitcount>120</waitcount>
+ <waitdelay>0.25</waitdelay>
+ <waitsuccess>30</waitsuccess>
+
+ <features>
+ <!-- Generic WebDAV extensions -->
+ <feature>COPY Method</feature> <!-- COPY method -->
+ <feature>MOVE Method</feature> <!-- MOVE method -->
+ <feature>Extended MKCOL</feature> <!-- Extended MKCOL -->
+
+ <!-- ACL related -->
+ <feature>ACL Method</feature> <!-- ACL method -->
+ <feature>acl-principal-prop-set REPORT</feature> <!-- ACL acl-principal-prop-set REPORT -->
+ <feature>principal-match REPORT</feature> <!-- ACL principal-match REPORT -->
+ <feature>principal-property-search REPORT</feature> <!-- ACL principal-property-search REPORT -->
+ <feature>principal-search-property-set REPORT</feature> <!-- ACL principal-search-property-set REPORT -->
+ <feature>calendarserver-principal-search REPORT</feature> <!-- ACL calendarserver-principal-search REPORT -->
+
+ <feature>add-member</feature> <!-- Add-member used to create resources -->
+ <!-- <feature>auth-on-root</feature> --> <!-- Whether the server requires authentication on the root URI -->
+ <feature>brief</feature> <!-- Brief header for PROPFIND, REPORT -->
+ <feature>bulk-post</feature> <!-- Bulk POST requests -->
+ <feature>ctag</feature> <!-- ctag extension -->
+ <feature>current-user-principal</feature> <!-- current-user-principal extension -->
+ <feature>directory listing</feature> <!-- GET on collection -->
+ <feature>extended-principal-search</feature> <!-- Extended principal-property-search REPORT extension -->
+ <feature>expand-property</feature> <!-- Expand property REPORT -->
+ <feature>only-proxy-groups</feature> <!-- Group-membership only includes delegated-to groups -->
+ <feature>limits</feature> <!-- max-collections and max-resources limits -->
+ <feature>own-root</feature> <!-- / is owned by this service -->
+ <feature>prefer</feature> <!-- Prefer header overall support -->
+ <feature>prefer-minimal</feature> <!-- Prefer header return=minimal -->
+ <feature>prefer-representation</feature> <!-- Prefer header return=representation -->
+ <feature>prefer-noroot</feature> <!-- Prefer header depth-noroot -->
+ <feature>quota</feature> <!-- WebDAV QUOTA -->
+ <!-- <feature>quota-on-resources</feature> --> <!-- WebDAV QUOTA on calendar and address book object resources -->
+ <feature>resource-id</feature> <!-- WebDAV BIND DAV:resource-id property -->
+ <feature>sync-report</feature> <!-- WebDAV collection sync REPORT -->
+ <!-- <feature>sync-report-limit</feature> --> <!-- WebDAV collection sync REPORT DAV:limit support -->
+ <!--<feature>sync-report-home</feature> &lt;!&ndash; WebDAV collection sync REPORT on Homes &ndash;&gt;-->
+ <feature>sync-report-config-token</feature> <!-- Sync REPORT token includes configuration component -->
+ <feature>well-known</feature> <!-- well-known feature -->
+
+ <!-- <feature>per-object-ACLs</feature> --> <!-- ACL for objects in calendar/address books -->
+ <!-- <feature>regular-collection</feature> --> <!-- Regular collections allowed in calendar/address book homes -->
+
+ <feature>json-data</feature> <!-- jCal and jCard support -->
+
+ <!-- CalendarServer specific extensions -->
+ <feature>control-api</feature> <!-- Control API support -->
+
+ <!-- CalDAV specific extension -->
+ <feature>caldav</feature> <!-- Basic CalDAV feature enabler -->
+ <feature>attachments-collection</feature> <!-- Server uses a collection in same WebDAV tree to store attachments -->
+ <feature>auto-accept</feature> <!-- Auto-accept for rooms & locations -->
+ <feature>auto-accept-modes</feature> <!-- Auto-accept modes -->
+ <feature>client-fix-TRANSP</feature> <!-- fix client TRANSP -->
+ <!-- <feature>dropbox</feature> --> <!-- dropbox extension -->
+ <feature>default-alarms</feature> <!-- default alarms extension -->
+ <feature>EMAIL parameter</feature> <!-- Server normalizes cuaddress and adds EMAIL parameter -->
+ <feature>extended-freebusy</feature> <!-- Extended freebusy response -->
+ <feature>freebusy-url</feature> <!-- Freebusy URL -->
+ <feature>group-attendee-expansion</feature> <!-- Auto-expansion of group attendees -->
+ <feature>implicit-scheduling</feature> <!-- CalDAV scheduling - implicit -->
+ <feature>location-resource-tracking</feature> <!-- Server tracks who makes unscheduled changes to locations and resources -->
+ <feature>managed-attachments</feature> <!-- CalDAV Managed Attachments -->
+ <feature>maskuid</feature> <!-- maskuid extension -->
+ <feature>no-duplicate-uids</feature> <!-- duplicate UIDs in same home not supported -->
+ <feature>partstat-timestamp</feature> <!-- Time stamps when PARTSTAT changes extension -->
+ <!-- <feature>podding</feature> --> <!-- Podded server -->
+ <feature>private-comments</feature> <!-- private-comments extension -->
+ <feature>private-events</feature> <!-- private-events extension -->
+ <feature>proxy</feature> <!-- calendar-user-proxy extension -->
+ <!-- <feature>proxy-authz</feature> --> <!-- sudo user extension -->
+ <feature>recurrence-splitting</feature> <!-- Recurring components can be split -->
+ <feature>remove-duplicate-alarms</feature> <!-- Server removes any duplicate alarms on PUT -->
+ <feature>query-extended</feature> <!-- calendar-query-extended extension -->
+ <feature>shared-calendars</feature> <!-- Shared calendars extension -->
+ <feature>share-calendars-to-groups</feature> <!-- Share calendars to groups extension -->
+ <feature>schedule-changes</feature> <!-- schedule-changes property extension -->
+ <feature>split-calendars</feature> <!-- Calendars are split by component type -->
+ <feature>supported-component-sets</feature> <!-- CALDAV:supported-calendar-component-sets on calendar homes -->
+ <feature>supported-component-sets-one</feature> <!-- Only single component calendars allowed to be created -->
+ <feature>timerange-low-limit</feature> <!-- Time-range only valid one year back -->
+ <feature>timerange-high-limit</feature> <!-- Time-range only valid 5 years ahead -->
+ <feature>timezones-by-reference</feature> <!-- Timezones by reference enabled -->
+ <feature>timezone-service</feature> <!-- Timezone service extension for Wiki -->
+ <feature>timezone-std-service</feature> <!-- Timezone standard service extension -->
+ <!-- <feature>trash-collection</feature> --> <!-- Trash collection enabled -->
+ <feature>travel-time-busy</feature> <!-- Travel time appears as busy -->
+ <feature>vavailability</feature> <!-- VAVAILABILITY on inbox -->
+ <!-- <feature>vpoll</feature> --> <!-- VPOLL support for store and scheduling -->
+ <feature>webcal</feature> <!-- Internet calendar subscription via GET on calendar collection -->
+
+ <!-- CardDAV specific extension -->
+ <feature>carddav</feature> <!-- Basic CardDAV feature enabler -->
+ <feature>default-addressbook</feature> <!-- Default address book behavior -->
+ <feature>shared-addressbooks</feature> <!-- Shared address books extension -->
+ <feature>shared-addressbook-groups</feature> <!-- Shared address book groups extension -->
+ <feature>directory-gateway</feature> <!-- Directory gateway extension -->
+
+ </features>
+
+ <substitutions>
+ <!-- Useful xpath shortcuts for verifiers -->
+ <substitution>
+ <key>$multistatus-response-prefix:</key>
+ <value>/{DAV:}multistatus/{DAV:}response</value>
+ </substitution>
+ <substitution>
+ <key>$multistatus-href-prefix:</key>
+ <value>/{DAV:}multistatus/{DAV:}response/{DAV:}href</value>
+ </substitution>
+ <substitution>
+ <key>$verify-response-prefix:</key>
+ <value>{DAV:}response/{DAV:}propstat/{DAV:}prop</value>
+ </substitution>
+ <substitution>
+ <key>$verify-property-prefix:</key>
+ <value>/{DAV:}multistatus/{DAV:}response/{DAV:}propstat/{DAV:}prop</value>
+ </substitution>
+ <substitution>
+ <key>$verify-bad-response:</key>
+ <value>/{DAV:}multistatus/{DAV:}response/{DAV:}status</value>
+ </substitution>
+ <substitution>
+ <key>$verify-error-response:</key>
+ <value>/{DAV:}multistatus/{DAV:}response/{DAV:}error</value>
+ </substitution>
+ <substitution>
+ <key>$CALDAV:</key>
+ <value>urn:ietf:params:xml:ns:caldav</value>
+ </substitution>
+ <substitution>
+ <key>$CARDDAV:</key>
+ <value>urn:ietf:params:xml:ns:carddav</value>
+ </substitution>
+ <substitution>
+ <key>$CS:</key>
+ <value>http://calendarserver.org/ns/</value>
+ </substitution>
+
+ <!-- Server configuration settings -->
+ <!-- $host: and $hostssl: are implicitly added by CalDAVTester based
+ on the host/nonsslport/sslport values and ssl command line switch -->
+
+ <!-- relative path to caldav root-->
+ <substitution>
+ <key>$root:</key>
+ <value>/remote.php/carddav/</value>
+ </substitution>
+
+ <!-- relative path to main principal collection-->
+ <substitution>
+ <key>$principalcollection:</key>
+ <value>$root:principals/</value>
+ </substitution>
+
+ <!-- the core record type collections-->
+ <substitution>
+ <key>$uidstype:</key>
+ <value>__uids__</value>
+ </substitution>
+ <substitution>
+ <key>$groupstype:</key>
+ <value>groups</value>
+ </substitution>
+ <substitution>
+ <key>$locationstype:</key>
+ <value>locations</value>
+ </substitution>
+ <substitution>
+ <key>$resourcestype:</key>
+ <value>resources</value>
+ </substitution>
+
+ <!-- relative path to record type principal collections-->
+ <substitution>
+ <key>$principals_uids:</key>
+ <value>$principalcollection:$uidstype:/</value>
+ </substitution>
+ <substitution>
+ <key>$principals_users:</key>
+ <value>$principalcollection:</value>
+ </substitution>
+ <substitution>
+ <key>$principals_groups:</key>
+ <value>$principalcollection:$groupstype:/</value>
+ </substitution>
+ <substitution>
+ <key>$principals_resources:</key>
+ <value>$principalcollection:$resourcestype:/</value>
+ </substitution>
+ <substitution>
+ <key>$principals_locations:</key>
+ <value>$principalcollection:$locationstype:/</value>
+ </substitution>
+
+ <!-- relative path to calendars collection-->
+ <substitution>
+ <key>$calendars:</key>
+ <value>$root:calendars/</value>
+ </substitution>
+
+ <!-- relative path to record type calendar collections-->
+ <substitution>
+ <key>$calendars_uids:</key>
+ <value>$calendars:$uidstype:/</value>
+ </substitution>
+ <substitution>
+ <key>$calendars_users:</key>
+ <value>$calendars:/</value>
+ </substitution>
+ <substitution>
+ <key>$calendars_resources:</key>
+ <value>$calendars:$resourcestype:/</value>
+ </substitution>
+ <substitution>
+ <key>$calendars_locations:</key>
+ <value>$calendars:$locationstype:/</value>
+ </substitution>
+
+ <!-- primary calendar name-->
+ <substitution>
+ <key>$calendar:</key>
+ <value>calendar</value>
+ </substitution>
+
+ <!-- primary tasks-only calendar name-->
+ <substitution>
+ <key>$tasks:</key>
+ <value>tasks</value>
+ </substitution>
+
+ <!-- primary polls-only calendar name-->
+ <substitution>
+ <key>$polls:</key>
+ <value>polls</value>
+ </substitution>
+
+ <!-- inbox name-->
+ <substitution>
+ <key>$inbox:</key>
+ <value>inbox</value>
+ </substitution>
+
+ <!-- outbox name-->
+ <substitution>
+ <key>$outbox:</key>
+ <value>outbox</value>
+ </substitution>
+
+ <!-- dropbox name-->
+ <substitution>
+ <key>$dropbox:</key>
+ <value>dropbox</value>
+ </substitution>
+
+ <!-- attachments name-->
+ <substitution>
+ <key>$attachments:</key>
+ <value>dropbox</value>
+ </substitution>
+
+ <!-- notification name-->
+ <substitution>
+ <key>$notification:</key>
+ <value>notification</value>
+ </substitution>
+
+ <!-- freebusy name-->
+ <substitution>
+ <key>$freebusy:</key>
+ <value>freebusy</value>
+ </substitution>
+
+ <!-- Sync home collection items - use "-" to include the home resource-->
+ <substitution>
+ <key>$calendar_home_items_initial_sync:</key>
+ <value>[-,$calendar:/,$tasks:/,$inbox:/,$outbox:/,$freebusy:,$notification:/]</value>
+ </substitution>
+
+ <!-- Sync collection extra items - use "-" to include the collection-->
+ <substitution>
+ <key>$calendar_sync_extra_items:</key>
+ <value>[-]</value>
+ </substitution>
+
+ <!-- Sync collection extra count - gets added to the totalcount value-->
+ <substitution>
+ <key>$calendar_sync_extra_count:</key>
+ <value>1</value> <!-- the request-uri resource is returned when no token passed-->
+ </substitution>
+
+ <!-- server-to-server inbox-->
+ <substitution>
+ <key>$servertoserver:</key>
+ <value>$root:inbox</value>
+ </substitution>
+
+ <!-- timezone service-->
+ <substitution>
+ <key>$timezoneservice:</key>
+ <value>$root:timezones</value>
+ </substitution>
+
+ <!-- timezone std service-->
+ <substitution>
+ <key>$timezonestdservice:</key>
+ <value>$root:stdtimezones</value>
+ </substitution>
+
+ <!-- relative path to addressbooks collection-->
+ <substitution>
+ <key>$addressbooks:</key>
+ <value>$root:addressbooks/</value>
+ </substitution>
+
+ <!-- relative path to record type addressbook collections-->
+ <substitution>
+ <key>$addressbooks_uids:</key>
+ <value>$addressbooks:$uidstype:/</value>
+ </substitution>
+ <substitution>
+ <key>$addressbooks_users:</key>
+ <value>$addressbooks:/</value>
+ </substitution>
+
+ <!-- primary addressbook name -->
+ <substitution>
+ <key>$addressbook:</key>
+ <value>addressbook</value>
+ </substitution>
+
+ <!-- directory name -->
+ <substitution>
+ <key>$directory:</key>
+ <value>$root:directory/</value>
+ </substitution>
+
+ <!-- POST add-member URI suffix -->
+ <substitution>
+ <key>$add-member:</key>
+ <value>;add-member</value>
+ </substitution>
+
+ <!-- user id for admin user -->
+ <substitution>
+ <key>$useradmin:</key>
+ <value>admin</value>
+ </substitution>
+ <!-- guid for admin user -->
+ <substitution>
+ <key>$useradminguid:</key>
+ <value>0C8BDE62-E600-4696-83D3-8B5ECABDFD2E</value>
+ </substitution>
+ <!-- password for admin user -->
+ <substitution>
+ <key>$pswdadmin:</key>
+ <value>admin</value>
+ </substitution>
+
+ <!-- relative path to admin principal resource-->
+ <substitution>
+ <key>$principal_admin:</key>
+ <value>$principals_users:$useradmin:/</value>
+ </substitution>
+ <substitution>
+ <key>$principaluri_admin:</key>
+ <value>$principals_uids:$useradminguid:/</value>
+ </substitution>
+
+ <!-- user id for apprentice user -->
+ <substitution>
+ <key>$userapprentice:</key>
+ <value>apprentice</value>
+ </substitution>
+ <!-- guid for apprentice user -->
+ <substitution>
+ <key>$userapprenticeguid:</key>
+ <value>29B6C503-11DF-43EC-8CCA-40C7003149CE</value>
+ </substitution>
+ <!-- password for admin user -->
+ <substitution>
+ <key>$pswdapprentice:</key>
+ <value>apprentice</value>
+ </substitution>
+
+ <!-- relative path to apprentice principal resource-->
+ <substitution>
+ <key>$principal_apprentice:</key>
+ <value>$principals_users:$userapprentice:/</value>
+ </substitution>
+ <substitution>
+ <key>$principaluri_apprentice:</key>
+ <value>$principals_uids:$userapprenticeguid:/</value>
+ </substitution>
+
+ <!-- user id for proxy user -->
+ <substitution>
+ <key>$userproxy:</key>
+ <value>superuser</value>
+ </substitution>
+ <!-- password for proxy user -->
+ <substitution>
+ <key>$pswdproxy:</key>
+ <value>superuser</value>
+ </substitution>
+
+ <!-- Forty user accounts -->
+ <repeat count="40">
+ <!-- user id -->
+ <substitution>
+ <key>$userid%d:</key>
+ <value>user%02d</value>
+ </substitution>
+ <!-- user guid -->
+ <substitution>
+ <key>$userguid%d:</key>
+ <value>10000000-0000-0000-0000-000000000%03d</value>
+ </substitution>
+ <!-- user name -->
+ <substitution>
+ <key>$username%d:</key>
+ <value>User %02d</value>
+ </substitution>
+ <!-- user name URI encoded -->
+ <substitution>
+ <key>$username-encoded%d:</key>
+ <value>User%%20%02d</value>
+ </substitution>
+ <!-- first name -->
+ <substitution>
+ <key>$firstname%d:</key>
+ <value>User</value>
+ </substitution>
+ <!-- last name -->
+ <substitution>
+ <key>$lastname%d:</key>
+ <value>%02d</value>
+ </substitution>
+ <!-- password -->
+ <substitution>
+ <key>$pswd%d:</key>
+ <value>user%02d</value>
+ </substitution>
+ <!-- relative path to user principal resource-->
+ <substitution>
+ <key>$principal%d:</key>
+ <value>$principals_users:$userid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$principaluri%d:</key>
+ <value>$principals_users:$userid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$principal%dnoslash:</key>
+ <value>$principals_users:$userid%d:</value>
+ </substitution>
+
+ <!-- relative path to user calendar home-->
+ <substitution>
+ <key>$calendarhome%d:</key>
+ <value>$calendars:$userid%d:</value>
+ </substitution>
+ <!-- relative path to user alternate calendar home-->
+ <substitution>
+ <key>$calendarhomealt%d:</key>
+ <value>$calendars_users:$userid%d:</value>
+ </substitution>
+ <!-- relative path to user calendar-->
+ <substitution>
+ <key>$calendarpath%d:</key>
+ <value>$calendarhome%d:/$calendar:</value>
+ </substitution>
+ <!-- relative path to user alternate calendar-->
+ <substitution>
+ <key>$calendarpathalt%d:</key>
+ <value>$calendarhomealt%d:/$calendar:</value>
+ </substitution>
+ <!-- relative path to user tasks calendar-->
+ <substitution>
+ <key>$taskspath%d:</key>
+ <value>$calendarhome%d:/$tasks:</value>
+ </substitution>
+ <!-- relative path to user polls calendar-->
+ <substitution>
+ <key>$pollspath%d:</key>
+ <value>$calendarhome%d:/$polls:</value>
+ </substitution>
+ <!-- relative path to user inbox-->
+ <substitution>
+ <key>$inboxpath%d:</key>
+ <value>$calendarhome%d:/$inbox:</value>
+ </substitution>
+ <!-- relative path to user outbox-->
+ <substitution>
+ <key>$outboxpath%d:</key>
+ <value>$calendarhome%d:/$outbox:</value>
+ </substitution>
+ <!-- relative path to user dropbox-->
+ <substitution>
+ <key>$dropboxpath%d:</key>
+ <value>$calendarhome%d:/$dropbox:</value>
+ </substitution>
+ <!-- relative path to user notification-->
+ <substitution>
+ <key>$notificationpath%d:</key>
+ <value>$calendarhome%d:/$notification:</value>
+ </substitution>
+ <!-- relative path to user freebusy-->
+ <substitution>
+ <key>$freebusypath%d:</key>
+ <value>$calendarhome%d:/$freebusy:</value>
+ </substitution>
+ <substitution>
+ <key>$email%d:</key>
+ <value>$userid%d:@example.com</value>
+ </substitution>
+ <!-- calendar user address of user-->
+ <substitution>
+ <key>$cuaddr%d:</key>
+ <value>mailto:$email%d:</value>
+ </substitution>
+ <substitution>
+ <key>$cuaddralt%d:</key>
+ <value>$cuaddr%d:</value>
+ </substitution>
+ <substitution>
+ <key>$cuaddraltnoslash%d:</key>
+ <value>$cuaddr%d:</value>
+ </substitution>
+ <substitution>
+ <key>$cuaddrurn%d:</key>
+ <value>urn:x-uid:$userguid%d:</value>
+ </substitution>
+
+ <!-- relative path to user addressbook home-->
+ <substitution>
+ <key>$addressbookhome%d:</key>
+ <value>$addressbooks:$userid%d:</value>
+ </substitution>
+ <!-- relative path to user addressbook-->
+ <substitution>
+ <key>$addressbookpath%d:</key>
+ <value>$addressbookhome%d:/$addressbook:</value>
+ </substitution>
+ </repeat>
+
+ <!-- Ten public accounts -->
+ <repeat count="10">
+ <!-- user id -->
+ <substitution>
+ <key>$publicuserid%d:</key>
+ <value>public%02d</value>
+ </substitution>
+ <!-- user guid -->
+ <substitution>
+ <key>$publicuserguid%d:</key>
+ <value>50000000-0000-0000-0000-0000000000%02d</value>
+ </substitution>
+ <!-- user name -->
+ <substitution>
+ <key>$publicusername%d:</key>
+ <value>Public %02d</value>
+ </substitution>
+ <!-- password -->
+ <substitution>
+ <key>$publicpswd%d:</key>
+ <value>public%02d</value>
+ </substitution>
+ <!-- relative path to user principal resource-->
+ <substitution>
+ <key>$publicprincipal%d:</key>
+ <value>$principals_users:$publicuserid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$publicprincipaluri%d:</key>
+ <value>$principals_uids:$publicuserguid%d:/</value>
+ </substitution>
+ <!-- relative path to user calendar home-->
+ <substitution>
+ <key>$publiccalendarhome%d:</key>
+ <value>$calendars_uids:$publicuserguid%d:</value>
+ </substitution>
+ <!-- relative path to user calendar-->
+ <substitution>
+ <key>$publiccalendarpath%d:</key>
+ <value>$calendars_uids:$publicuserguid%d:/$calendar:</value>
+ </substitution>
+ <substitution>
+ <key>$publicemail%d:</key>
+ <value>$publicuserid%d:@example.com</value>
+ </substitution>
+ <!-- calendar user address of user-->
+ <substitution>
+ <key>$publiccuaddr%d:</key>
+ <value>mailto:$publicemail%d:</value>
+ </substitution>
+ <substitution>
+ <key>$publiccuaddralt%d:</key>
+ <value>$publiccuaddr%d:</value>
+ </substitution>
+ <substitution>
+ <key>$publiccuaddrurn%d:</key>
+ <value>urn:x-uid:$publicuserguid%d:</value>
+ </substitution>
+ </repeat>
+
+ <!-- Twenty resource accounts -->
+ <repeat count="20">
+ <substitution>
+ <key>$resourceid%d:</key>
+ <value>resource%02d</value>
+ </substitution>
+ <!-- resource guid-->
+ <substitution>
+ <key>$resourceguid%d:</key>
+ <value>40000000-0000-0000-0000-000000000%03d</value>
+ </substitution>
+ <!-- resource name-->
+ <substitution>
+ <key>$resourcename%d:</key>
+ <value>Resource %02d</value>
+ </substitution>
+ <!-- relative path to first resource calendar home-->
+ <substitution>
+ <key>$rcalendarhome%d:</key>
+ <value>$calendars_uids:$resourceguid%d:</value>
+ </substitution>
+ <!-- relative path to first resource calendar home-->
+ <substitution>
+ <key>$rcalendarpath%d:</key>
+ <value>$calendars_uids:$resourceguid%d:/$calendar:</value>
+ </substitution>
+ <!-- relative path to first resource inbox-->
+ <substitution>
+ <key>$rinboxpath%d:</key>
+ <value>$calendars_uids:$resourceguid%d:/$inbox:</value>
+ </substitution>
+ <!-- relative path to first resource outbox-->
+ <substitution>
+ <key>$routboxpath%d:</key>
+ <value>$calendars_uids:$resourceguid%d:/$outbox:</value>
+ </substitution>
+ <!-- relative path to first resource principal resource-->
+ <substitution>
+ <key>$rprincipal%d:</key>
+ <value>$principals_resources:$resourceid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$rprincipaluri%d:</key>
+ <value>$principals_uids:$resourceguid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$rcuaddralt%d:</key>
+ <value>$rcuaddrurn%d:</value>
+ </substitution>
+ <substitution>
+ <key>$rcuaddrurn%d:</key>
+ <value>urn:x-uid:$resourceguid%d:</value>
+ </substitution>
+ </repeat>
+
+ <!-- Ten Location accounts -->
+ <repeat count="10">
+ <substitution>
+ <key>$locationid%d:</key>
+ <value>location%02d</value>
+ </substitution>
+ <!-- location guid-->
+ <substitution>
+ <key>$locationguid%d:</key>
+ <value>30000000-0000-0000-0000-000000000%03d</value>
+ </substitution>
+ <!-- location name-->
+ <substitution>
+ <key>$locationname%d:</key>
+ <value>Location %02d</value>
+ </substitution>
+ <!-- relative path to first location calendar home-->
+ <substitution>
+ <key>$lcalendarhome%d:</key>
+ <value>$calendars_uids:$locationguid%d:</value>
+ </substitution>
+ <!-- relative path to first location calendar home-->
+ <substitution>
+ <key>$lcalendarpath%d:</key>
+ <value>$calendars_uids:$locationguid%d:/$calendar:</value>
+ </substitution>
+ <!-- relative path to first location inbox-->
+ <substitution>
+ <key>$linboxpath%d:</key>
+ <value>$calendars_uids:$locationguid%d:/$inbox:</value>
+ </substitution>
+ <!-- relative path to first location outbox-->
+ <substitution>
+ <key>$loutboxpath%d:</key>
+ <value>$calendars_uids:$locationguid%d:/$outbox:</value>
+ </substitution>
+ <!-- relative path to first location principal resource-->
+ <substitution>
+ <key>$lprincipal%d:</key>
+ <value>$principals_resources:$locationid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$lprincipaluri%d:</key>
+ <value>$principals_uids:$locationguid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$lcuaddralt%d:</key>
+ <value>$lprincipaluri%d:</value>
+ </substitution>
+ <substitution>
+ <key>$lcuaddrurn%d:</key>
+ <value>urn:x-uid:$locationguid%d:</value>
+ </substitution>
+ </repeat>
+
+
+ <!-- Ten Group accounts -->
+ <repeat count="40">
+ <substitution>
+ <key>$groupid%d:</key>
+ <value>group%02d</value>
+ </substitution>
+ <!-- group guid-->
+ <substitution>
+ <key>$groupguid%d:</key>
+ <value>20000000-0000-0000-0000-000000000%03d</value>
+ </substitution>
+ <!-- group name-->
+ <substitution>
+ <key>$groupname%d:</key>
+ <value>Group %02d</value>
+ </substitution>
+ <!-- relative path to first group principal resource-->
+ <substitution>
+ <key>$gprincipal%d:</key>
+ <value>$principals_resources:$groupid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$gprincipaluri%d:</key>
+ <value>$principals_uids:$groupguid%d:/</value>
+ </substitution>
+ <substitution>
+ <key>$gemail%d:</key>
+ <value>$groupid%d:@example.com</value>
+ </substitution>
+ <substitution>
+ <key>$gcuaddralt%d:</key>
+ <value>$gprincipaluri%d:</value>
+ </substitution>
+ <substitution>
+ <key>$gcuaddrurn%d:</key>
+ <value>urn:x-uid:$groupguid%d:</value>
+ </substitution>
+ </repeat>
+
+ <!-- User with non-ascii name -->
+ <substitution>
+ <key>$i18nid:</key>
+ <value>i18nuser</value>
+ </substitution>
+ <!-- group guid-->
+ <substitution>
+ <key>$i18nguid:</key>
+ <value>860B3EE9-6D7C-4296-9639-E6B998074A78</value>
+ </substitution>
+ <!-- group name-->
+ <substitution>
+ <key>$i18nname:</key>
+ <value>まだ</value>
+ </substitution>
+ <!-- password -->
+ <substitution>
+ <key>$i18npswd:</key>
+ <value>i18nuser</value>
+ </substitution>
+ <!-- relative path to user calendar-->
+ <substitution>
+ <key>$i18ncalendarpath:</key>
+ <value>$calendars_uids:$i18nguid:/$calendar:</value>
+ </substitution>
+ <substitution>
+ <key>$i18nemail:</key>
+ <value>$i18nid:@example.com</value>
+ </substitution>
+ <!-- CUAddrs -->
+ <substitution>
+ <key>$i18ncuaddr:</key>
+ <value>mailto:$i18nemail:</value>
+ </substitution>
+ <substitution>
+ <key>$i18ncuaddrurn:</key>
+ <value>urn:x-uid:$i18nguid:</value>
+ </substitution>
+
+ <!-- relative path to disabled group principal resource-->
+ <substitution>
+ <key>$principaldisabled:</key>
+ <value>$principals_groups:disabledgroup/</value>
+ </substitution>
+ <substitution>
+ <key>$principaluridisabled:</key>
+ <value>$principals_uids:disabledgroup/</value>
+ </substitution>
+ <!-- calendar user address of disabled group-->
+ <substitution>
+ <key>$cuaddrdisabled:</key>
+ <value>$principals_uids:disabledgroup/</value>
+ </substitution>
+
+ <!-- Override some of the above definitions for special cases -->
+
+ <!-- calendar user address of second user-->
+ <substitution>
+ <key>$cuaddr2:</key>
+ <value>MAILTO:$email2:</value>
+ </substitution>
+
+ </substitutions>
+</serverinfo>
diff --git a/apps/dav/tests/testsuits/caldavtest/serverinfo.dtd b/apps/dav/tests/testsuits/caldavtest/serverinfo.dtd
new file mode 100644
index 00000000000..d3841e363ad
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/serverinfo.dtd
@@ -0,0 +1,32 @@
+<!--
+ - SPDX-FileCopyrightText: 2006-2015 Apple Inc. All rights reserved.
+ - SPDX-License-Identifier: Apache-2.0
+-->
+
+<!ELEMENT serverinfo (host, path, nonsslport, sslport, unix?,
+ host2?, nonsslport2?, sslport2?, unix2?,
+ authtype?, waitcount?, waitdelay?, waitsuccess?,
+ features?, substitutions)? >
+
+ <!ELEMENT host (#PCDATA)>
+ <!ELEMENT path (#PCDATA)>
+ <!ELEMENT nonsslport (#PCDATA)>
+ <!ELEMENT sslport (#PCDATA)>
+ <!ELEMENT unix (#PCDATA)>
+ <!ELEMENT host2 (#PCDATA)>
+ <!ELEMENT nonsslport2 (#PCDATA)>
+ <!ELEMENT sslport2 (#PCDATA)>
+ <!ELEMENT unix2 (#PCDATA)>
+ <!ELEMENT authtype (#PCDATA)>
+ <!ELEMENT waitdelay (#PCDATA)>
+ <!ELEMENT waitcount (#PCDATA)>
+ <!ELEMENT waitsuccess (#PCDATA)>
+ <!ELEMENT features (feature*)>
+ <!ELEMENT feature (#PCDATA)>
+ <!ELEMENT substitutions (substitution|repeat)*>
+ <!ELEMENT repeat (substitution+)>
+ <!ATTLIST repeat count CDATA "1">
+ <!ELEMENT substitution (key, value)>
+ <!ELEMENT key (#PCDATA)>
+ <!ELEMENT value (#PCDATA)>
+
diff --git a/apps/dav/tests/testsuits/caldavtest/tests/CalDAV/current-user-principal.xml b/apps/dav/tests/testsuits/caldavtest/tests/CalDAV/current-user-principal.xml
new file mode 100644
index 00000000000..79ccd50e01f
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/tests/CalDAV/current-user-principal.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ - SPDX-FileCopyrightText: 2006-2015 Apple Inc. All rights reserved.
+ - SPDX-License-Identifier: Apache-2.0
+-->
+
+<caldavtest>
+ <description>Test DAV:current-user-principal support</description>
+
+ <require-feature>
+ <feature>caldav</feature>
+ <feature>current-user-principal</feature>
+ </require-feature>
+
+ <start/>
+
+ <test-suite name='Check for the property on /'>
+ <require-feature>
+ <feature>own-root</feature>
+ </require-feature>
+ <test name='1'>
+ <description>Check for authenticated property on /</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$root:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value><![CDATA[{DAV:}current-user-principal$<href xmlns="DAV:">$principaluri1:</href>]]></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>Check for authenticated property on / (user02)</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <ruri>$root:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value><![CDATA[{DAV:}current-user-principal$<href xmlns="DAV:">$principaluri2:</href>]]></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Check for the property on /principals/'>
+ <test name='1'>
+ <description>Check for authenticated property on /</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$principalcollection:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value><![CDATA[{DAV:}current-user-principal$<href xmlns="DAV:">$principaluri1:</href>]]></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>Check for unauthenticated property on /</description>
+ <request auth="no">
+ <method>PROPFIND</method>
+ <ruri>$principals_users:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>401</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>Check for authenticated property on / (user02)</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <ruri>$principalcollection:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/current-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value><![CDATA[{DAV:}current-user-principal$<href xmlns="DAV:">$principaluri2:</href>]]></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <end/>
+</caldavtest>
diff --git a/apps/dav/tests/testsuits/caldavtest/tests/CalDAV/sharing-calendars.xml b/apps/dav/tests/testsuits/caldavtest/tests/CalDAV/sharing-calendars.xml
new file mode 100644
index 00000000000..97541025736
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/tests/CalDAV/sharing-calendars.xml
@@ -0,0 +1,578 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ - SPDX-FileCopyrightText: 2006-2015 Apple Inc. All rights reserved.
+ - SPDX-License-Identifier: Apache-2.0
+-->
+
+<caldavtest>
+ <description>Test calendar sharing calendars</description>
+
+ <require-feature>
+ <feature>caldav</feature>
+ <feature>shared-calendars</feature>
+ </require-feature>
+
+ <start>
+ <!--
+ <request user="$userid1:" pswd="$pswd1:">
+ <method>DELETEALL</method>
+ <ruri>$notificationpath1:/</ruri>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>DELETEALL</method>
+ <ruri>$notificationpath2:/</ruri>
+ </request>
+ <request end-delete="yes">
+ <method>MKCALENDAR</method>
+ <ruri>$calendarhome1:/shared/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$calendarhome1:/shared/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/PROPPATCH/calendar-transp-opaque.xml</filepath>
+ </data>
+ </request>
+ -->
+ </start>
+
+ <test-suite name='Read-write calendar'>
+ <test name='1'>
+ <description>POST invitation</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarhome1:/shared/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-write/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>Shared calendar exists</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <ruri>$calendarhome2:/shared_shared_by_user01/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-write/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}owner/{DAV:}href[=$principaluri1:]</value>
+ <value>$verify-property-prefix:/{DAV:}resourcetype/{DAV:}collection</value>
+ <value>$verify-property-prefix:/{DAV:}resourcetype/{urn:ietf:params:xml:ns:caldav}calendar</value>
+ <!-- value>$verify-property-prefix:/{DAV:}resourcetype/{http://calendarserver.org/ns/}shared</value -->
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}read</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}write</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}bind</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}unbind</value>
+ <!-- value>$verify-property-prefix:/{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp/{urn:ietf:params:xml:ns:caldav}transparent</value -->
+ </arg>
+ <arg>
+ <name>notexists</name>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}admin</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}all</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4a'>
+ <description>Shared calendar exists Depth:1</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <ruri>$calendarhome2:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-write/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>parent</name>
+ <value>$multistatus-response-prefix:[^{DAV:}href=$calendarhome2:/shared_shared_by_user01/]</value>
+ </arg>
+ <arg>
+ <name>exists</name>
+ <value>$verify-response-prefix:/{DAV:}owner/{DAV:}href[=$principaluri1:]</value>
+ <value>$verify-response-prefix:/{DAV:}resourcetype/{DAV:}collection</value>
+ <value>$verify-response-prefix:/{DAV:}resourcetype/{urn:ietf:params:xml:ns:caldav}calendar</value>
+ <!-- value>$verify-response-prefix:/{DAV:}resourcetype/{http://calendarserver.org/ns/}shared</value -->
+ <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}read</value>
+ <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}write</value>
+ <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}bind</value>
+ <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}unbind</value>
+ <!-- value>$verify-response-prefix:/{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp/{urn:ietf:params:xml:ns:caldav}transparent</value -->
+ </arg>
+ <arg>
+ <name>notexists</name>
+ <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}admin</value>
+ <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}all</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5'>
+ <description>Original calendar unchanged</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$calendarhome1:/shared/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-write/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}owner/{DAV:}href[=$principaluri1:]</value>
+ <!--<value>$verify-property-prefix:/{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp/{urn:ietf:params:xml:ns:caldav}opaque</value>-->
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5a'>
+ <description>Invite propfind returns sharees</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$calendarhome1:/shared/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-write/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{http://owncloud.org/ns}invite/{http://owncloud.org/ns}user/{DAV:}href</value>
+ <value>$verify-property-prefix:/{http://owncloud.org/ns}invite/{http://owncloud.org/ns}user/{http://owncloud.org/ns}invite-accepted</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6'>
+ <description>Sharee creates event</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PUT</method>
+ <ruri>$calendarhome2:/shared_shared_by_user01/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-write/5.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='7'>
+ <description>Sharer sees event</description>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/sharing/calendars/read-write/5.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='8'>
+ <description>Sharer changes event</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-write/6.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='9'>
+ <description>Sharee sees changed event</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GET</method>
+ <ruri>$calendarhome2:/shared_shared_by_user01/1.ics</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/sharing/calendars/read-write/6.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='10'>
+ <description>Sharer creates event</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/shared/2.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-write/7.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='11'>
+ <description>Sharee sees new event</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GET</method>
+ <ruri>$calendarhome2:/shared_shared_by_user01/2.ics</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/sharing/calendars/read-write/7.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='12'>
+ <description>Sharee changes event</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PUT</method>
+ <ruri>$calendarhome2:/shared_shared_by_user01/2.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-write/8.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='13'>
+ <description>Sharer sees changed event</description>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarhome1:/shared/2.ics</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/sharing/calendars/read-write/8.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='14'>
+ <description>Un-share by delete</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>DELETE</method>
+ <ruri>$calendarhome2:/shared_shared_by_user01/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='15'>
+ <description>Original calendar still exists</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$calendarhome1:/shared/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-write/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}owner/{DAV:}href[=$principaluri1:]</value>
+ <value>$verify-property-prefix:/{DAV:}resourcetype/{DAV:}collection</value>
+ <value>$verify-property-prefix:/{DAV:}resourcetype/{urn:ietf:params:xml:ns:caldav}calendar</value>
+ <!-- value>$verify-property-prefix:/{DAV:}resourcetype/{http://calendarserver.org/ns/}shared</value -->
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}read</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}write</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}bind</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}unbind</value>
+ <!-- value>$verify-property-prefix:/{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp/{urn:ietf:params:xml:ns:caldav}transparent</value -->
+ </arg>
+ <arg>
+ <name>notexists</name>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}admin</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}all</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='16'>
+ <description>Shared calendar no longer exists Depth:1</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <ruri>$calendarhome2:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-write/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>notexists</name>
+ <value>$multistatus-response-prefix:[^{DAV:}href=$calendarhome2:/shared_shared_by_user01/]</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <!--
+ <test-suite name='Default calendar cannot be shared calendar'>
+ <test name='1'>
+ <description>Set property on Inbox</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPPATCH</method>
+ <ruri>$inboxpath2:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/defaultcalendar/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>badprops</name>
+ <value>{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>Verify property on inbox</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <ruri>$inboxpath2:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/defaultcalendar/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value><![CDATA[{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL$<href xmlns="DAV:">$calendarpath2:</href>]]></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Change to read-only calendar'>
+ <test name='1'>
+ <description>POST invitation</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarhome1:/shared/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-only/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>Check Sharee notification collection</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>WAITCOUNT 1</method>
+ <ruri>$notificationpath2:/</ruri>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GETNEW</method>
+ <ruri>$notificationpath2:/</ruri>
+ <verify>
+ <callback>xmlDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/sharing/calendars/read-only/2.xml</value>
+ </arg>
+ <arg>
+ <name>filter</name>
+ <value>{http://calendarserver.org/ns/}dtstamp</value>
+ <value>{http://calendarserver.org/ns/}uid</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+ <variable>$inviteuid:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>Sharee replies ACCEPTED</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>POST</method>
+ <ruri>$calendarhome2:/</ruri>
+ <data>
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-only/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ <grabelement>
+ <name>{DAV:}href</name>
+ <variable>$sharedcalendar:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='4'>
+ <description>Shared calendar exists</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <ruri>$sharedcalendar:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-only/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}owner/{DAV:}href[=$principaluri1:]</value>
+ <value>$verify-property-prefix:/{DAV:}resourcetype/{http://calendarserver.org/ns/}shared</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}read</value>
+ </arg>
+ <arg>
+ <name>notexists</name>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}write</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}bind</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}unbind</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}admin</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}all</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5'>
+ <description>Create event</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PUT</method>
+ <ruri>$sharedcalendar:/3.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-only/5.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>403</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6'>
+ <description>Sharer creates event</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/shared/4.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-only/6.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='7'>
+ <description>Sharee sees new event</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GET</method>
+ <ruri>$sharedcalendar:/4.ics</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/sharing/calendars/read-only/6.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='8'>
+ <description>Sharee cannot change event</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PUT</method>
+ <ruri>$sharedcalendar:/4.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/sharing/calendars/read-only/7.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>403</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+-->
+
+ <end>
+ <!--
+ <request user="$useradmin:" pswd="$pswdadmin:">
+ <method>DELETEALL</method>
+ <ruri>$notificationpath1:/</ruri>
+ <ruri>$notificationpath2:/</ruri>
+ <ruri>$notificationpath3:/</ruri>
+ <ruri>$notificationpath4:/</ruri>
+ </request>
+ -->
+ </end>
+
+</caldavtest>
diff --git a/apps/dav/tests/testsuits/caldavtest/tests/CalDAV/sync-report.xml b/apps/dav/tests/testsuits/caldavtest/tests/CalDAV/sync-report.xml
new file mode 100644
index 00000000000..fda5a5f3fe6
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/tests/CalDAV/sync-report.xml
@@ -0,0 +1,3318 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ - SPDX-FileCopyrightText: 2006-2015 Apple Inc. All rights reserved.
+ - SPDX-License-Identifier: Apache-2.0
+-->
+
+<caldavtest>
+ <require-feature>
+ <feature>caldav</feature>
+ <feature>sync-report</feature>
+ </require-feature>
+
+ <start>
+ <request end-delete="yes">
+ <method>MKCOL</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <data>
+ <content-type>application/xml; charset="utf-8"</content-type>
+ <filepath>Resource/CalDAV/reports/put/1.xml</filepath>
+ </data>
+ </request>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar1/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/1.txt</filepath>
+ </data>
+ </request>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar1/2.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/2.txt</filepath>
+ </data>
+ </request>
+ <request end-delete="yes">
+ <method>MKCOL</method>
+ <ruri>$calendarhome1:/synccalendar2/</ruri>
+ <data>
+ <content-type>application/xml; charset="utf-8"</content-type>
+ <filepath>Resource/CalDAV/reports/put/1.xml</filepath>
+ </data>
+ </request>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar2/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/4.txt</filepath>
+ </data>
+ </request>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar2/2.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/5.txt</filepath>
+ </data>
+ </request>
+ </start>
+
+ <test-suite name='support-report-set/sync-token property'>
+ <test name='1'>
+ <description>Not on calendars</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$calendars:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>notexists</name>
+ <value>$verify-property-prefix:/{DAV:}supported-report-set/{DAV:}supported-report/{DAV:}report/{DAV:}sync-collection</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}supported-report-set</value>
+ </arg>
+ <arg>
+ <name>badprops</name>
+ <value>{DAV:}sync-token</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>On calendar</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}supported-report-set/{DAV:}supported-report/{DAV:}report/{DAV:}sync-collection</value>
+ <!--<value>$verify-property-prefix:/{DAV:}sync-token[+data:,]</value>-->
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}supported-report-set</value>
+ <value>{DAV:}sync-token</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - sync-level'>
+ <test name='1'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:1, depth:0</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/8.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar1/</value>
+ <value>synccalendar2/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:1, depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/8.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar1/</value>
+ <value>synccalendar2/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:1, depth:infinity</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/8.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar1/</value>
+ <value>synccalendar2/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:infinity, depth:0</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/9.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar1/</value>
+ <value>synccalendar1/1.ics</value>
+ <value>synccalendar1/2.ics</value>
+ <value>synccalendar2/</value>
+ <value>synccalendar2/1.ics</value>
+ <value>synccalendar2/2.ics</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:infinity, depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/9.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar1/</value>
+ <value>synccalendar1/1.ics</value>
+ <value>synccalendar1/2.ics</value>
+ <value>synccalendar2/</value>
+ <value>synccalendar2/1.ics</value>
+ <value>synccalendar2/2.ics</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:infinity, depth:infinity</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/9.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar1/</value>
+ <value>synccalendar1/1.ics</value>
+ <value>synccalendar1/2.ics</value>
+ <value>synccalendar2/</value>
+ <value>synccalendar2/1.ics</value>
+ <value>synccalendar2/2.ics</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='7'>
+ <description>sync-level:1, depth:0</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/8.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='8'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:1, depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/8.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='9'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:1, depth:infinity</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/8.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='10'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:infinity, depth:0</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/9.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='11'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:infinity, depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/9.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='12'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:infinity, depth:infinity</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/9.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - empty token - no props'>
+ <test name='1'>
+ <description>initial query - calendar collection depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>initial query - home depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar1/</value>
+ <value>synccalendar2/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>initial query - home depth:infinity</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar1/</value>
+ <value>synccalendar1/1.ics</value>
+ <value>synccalendar1/2.ics</value>
+ <value>synccalendar2/</value>
+ <value>synccalendar2/1.ics</value>
+ <value>synccalendar2/2.ics</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>add new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar1/3.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/3.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='5'>
+ <description>new resource - calendar collection depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ <value>3.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>new resource - home depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar1/</value>
+ <value>synccalendar2/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='7'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>new resource - home depth:infinity</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar1/</value>
+ <value>synccalendar1/1.ics</value>
+ <value>synccalendar1/2.ics</value>
+ <value>synccalendar1/3.ics</value>
+ <value>synccalendar2/</value>
+ <value>synccalendar2/1.ics</value>
+ <value>synccalendar2/2.ics</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='8'>
+ <description>remove new resource</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar1/3.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='9'>
+ <description>remove new resource - calendar collection depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='10'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>remove new resource - home depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar1/</value>
+ <value>synccalendar2/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='11'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>remove new resource - home depth:infinity</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar1/</value>
+ <value>synccalendar1/1.ics</value>
+ <value>synccalendar1/2.ics</value>
+ <value>synccalendar2/</value>
+ <value>synccalendar2/1.ics</value>
+ <value>synccalendar2/2.ics</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='12'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar1/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/1.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='13'>
+ <description>changed resource - calendar collection depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='14'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>changed resource - home depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar1/</value>
+ <value>synccalendar2/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='15'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>changed resource - home depth:infinity</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar1/</value>
+ <value>synccalendar1/1.ics</value>
+ <value>synccalendar1/2.ics</value>
+ <value>synccalendar2/</value>
+ <value>synccalendar2/1.ics</value>
+ <value>synccalendar2/2.ics</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - diff token - no props - calendar depth:1'>
+ <test name='1'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar1/3.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/3.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>3.ics</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar1/3.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>badhrefs</name>
+ <value>3.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>remove resource (treated as old)</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>badhrefs</name>
+ <value>3.ics</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='5'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar1/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/1.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='6'>
+ <description>no change</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - empty token - props'>
+ <test name='1'>
+ <description>initial query</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar2/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar2/3.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/6.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar2/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ <value>3.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>remove resource new resource</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar2/3.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar2/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar2/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/4.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar2/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - diff token - props'>
+ <test name='1'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar2/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ <value>2.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar2/3.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/6.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar2/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>3.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar2/3.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar2/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>badhrefs</name>
+ <value>3.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>remove resource (treated as old)</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar2/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/7.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>badhrefs</name>
+ <value>3.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='5'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar2/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/4.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar2/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='6'>
+ <description>no change</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/synccalendar2/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - diff token - no props - home depth:infinity'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>Initialize</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar2/</ruri>
+ </request>
+ <request end-delete="yes">
+ <method>MKCALENDAR</method>
+ <ruri>$calendarhome1:/synccalendar3/</ruri>
+ </request>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar3/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/7.txt</filepath>
+ </data>
+ </request>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar3/2.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/8.txt</filepath>
+ </data>
+ </request>
+ <request end-delete="yes">
+ <method>MKCALENDAR</method>
+ <ruri>$calendarhome1:/synccalendar4/</ruri>
+ </request>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar4/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/10.txt</filepath>
+ </data>
+ </request>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar4/2.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/11.txt</filepath>
+ </data>
+ </request>
+ </test>
+ <test name='2'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar3/</value>
+ <value>synccalendar3/1.ics</value>
+ <value>synccalendar3/2.ics</value>
+ <value>synccalendar4/</value>
+ <value>synccalendar4/1.ics</value>
+ <value>synccalendar4/2.ics</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar3/3.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/9.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ <value>synccalendar3/3.ics</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='4'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar3/3.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>synccalendar3/3.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5'>
+ <description>remove resource (treated as old)</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>synccalendar3/3.ics</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='6'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar3/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/7.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ <value>synccalendar3/1.ics</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='7'>
+ <description>no change</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - diff token - props - home depth:infinity'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar3/</value>
+ <value>synccalendar3/1.ics</value>
+ <value>synccalendar3/2.ics</value>
+ <value>synccalendar4/</value>
+ <value>synccalendar4/1.ics</value>
+ <value>synccalendar4/2.ics</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>ignore</name>
+ <value>$calendarhome1:/$outbox:/</value>
+ <value>$calendarhome1:/$freebusy:</value>
+ <value>$calendarhome1:/$notification:/</value>
+ <value>$calendarhome1:/$dropbox:/</value>
+ </arg>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar4/3.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/12.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar4/</value>
+ <value>synccalendar4/3.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar4/3.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar4/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>synccalendar4/3.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>remove resource (treated as old)</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/7.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar4/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>synccalendar4/3.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>count</name>
+ <value>2</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='5'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar4/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/10.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar4/</value>
+ <value>synccalendar4/1.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='6'>
+ <description>no change</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - diff token - delete/create calendar - home depth:infinity'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar3/</value>
+ <value>synccalendar3/1.ics</value>
+ <value>synccalendar3/2.ics</value>
+ <value>synccalendar4/</value>
+ <value>synccalendar4/1.ics</value>
+ <value>synccalendar4/2.ics</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2'>
+ <description>remove resource then calendar</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar3/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar3/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>badhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>add calendar - test last sync</description>
+ <request>
+ <method>MKCALENDAR</method>
+ <ruri>$calendarhome1:/synccalendar3/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>add calendar - test previous sync</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - diff token - no props - home depth:1'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>Initialize</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar1/</ruri>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar2/</ruri>
+ </request>
+ <request end-delete="yes">
+ <method>MKCALENDAR</method>
+ <ruri>$calendarhome1:/synccalendar3/</ruri>
+ </request>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar3/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/7.txt</filepath>
+ </data>
+ </request>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar3/2.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/8.txt</filepath>
+ </data>
+ </request>
+ <request end-delete="yes">
+ <method>MKCALENDAR</method>
+ <ruri>$calendarhome1:/synccalendar4/</ruri>
+ </request>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar4/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/10.txt</filepath>
+ </data>
+ </request>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar4/2.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/11.txt</filepath>
+ </data>
+ </request>
+ </test>
+ <test name='2'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/8.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar3/</value>
+ <value>synccalendar4/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar3/3.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/9.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/12.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='4'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar3/3.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/12.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5'>
+ <description>remove resource (treated as old)</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/13.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='6'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar3/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/7.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/12.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='7'>
+ <description>no change</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/12.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - diff token - props - home depth:1'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/14.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar3/</value>
+ <value>synccalendar4/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>ignore</name>
+ <value>$calendarhome1:/$outbox:/</value>
+ <value>$calendarhome1:/$freebusy:</value>
+ <value>$calendarhome1:/$notification:/</value>
+ <value>$calendarhome1:/$dropbox:/</value>
+ </arg>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar4/3.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/12.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/15.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar4/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar4/3.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/15.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar4/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>remove resource (treated as old)</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/16.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar4/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>count</name>
+ <value>1</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='5'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/synccalendar4/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/put/10.txt</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/15.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar4/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='6'>
+ <description>no change</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/15.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - diff token - delete/create calendar - home depth:1'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/8.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar3/</value>
+ <value>synccalendar4/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2'>
+ <description>remove resource then calendar</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar3/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/synccalendar3/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/12.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>badhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>add calendar - test last sync</description>
+ <request>
+ <method>MKCALENDAR</method>
+ <ruri>$calendarhome1:/synccalendar3/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/13.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>add calendar - test previous sync</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/12.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - valid token'>
+ <test name='1'>
+ <description>initial query</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/11.xml</filepath>
+ </data>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}valid-sync-token</value>
+ </arg>
+ <arg>
+ <name>ignoreextras</name>
+ <value>{http://sabredav.org/ns}message</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='calendar webdav property change - home depth:infinity'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar3/</value>
+ <value>synccalendar4/</value>
+ <value>synccalendar4/1.ics</value>
+ <value>synccalendar4/2.ics</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2'>
+ <description>Change a property</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$calendarhome1:/synccalendar3/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/17.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>/{DAV:}multistatus/{DAV:}sync-token[!$synctoken1:]</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>Remove a property</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$calendarhome1:/synccalendar3/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/18.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>/{DAV:}multistatus/{DAV:}sync-token[!$synctoken1:]</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='calendar webdav property change - home depth:1'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/8.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar3/</value>
+ <value>synccalendar4/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2'>
+ <description>Change a property</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$calendarhome1:/synccalendar3/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/17.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/12.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>/{DAV:}multistatus/{DAV:}sync-token[!$synctoken1:]</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>Remove a property</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$calendarhome1:/synccalendar3/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/18.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/12.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>synccalendar3/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>/{DAV:}multistatus/{DAV:}sync-token[!$synctoken1:]</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+
+ <test-suite name='default calendar property change - home depth:1'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/8.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar3/</value>
+ <value>synccalendar4/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2'>
+ <description>Change property on Inbox</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$inboxpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/19.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL</value>
+ </arg>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/12.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$inbox:/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>/{DAV:}multistatus/{DAV:}sync-token[!$synctoken1:]</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>Reset the property</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$inboxpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/20.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL</value>
+ </arg>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/12.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$inbox:/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>/{DAV:}multistatus/{DAV:}sync-token[!$synctoken1:]</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+
+ <test-suite name='schedule-calendar-transp in response - home depth:1'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_home_items_initial_sync:</value>
+ <value>synccalendar3/</value>
+ <value>synccalendar4/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$dropbox:/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>dataString</callback>
+ <arg>
+ <name>contains</name>
+ <value>opaque</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2'>
+ <description>Change property on calendar</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/PROPPATCH/calendar-transp-transparent.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp</value>
+ </arg>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/23.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar:/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>/{DAV:}multistatus/{DAV:}sync-token[!$synctoken1:]</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>dataString</callback>
+ <arg>
+ <name>contains</name>
+ <value>transparent</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>Reset the property</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/PROPPATCH/calendar-transp-opaque.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp</value>
+ </arg>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/23.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar:/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>/{DAV:}multistatus/{DAV:}sync-token[!$synctoken1:]</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>dataString</callback>
+ <arg>
+ <name>contains</name>
+ <value>opaque</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+
+
+ <test-suite name='Prefer:return=minimal - home depth:1'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>initial query - no minimal</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/24.xml</filepath>
+ </data>
+ <verify>
+ <callback>dataString</callback>
+ <arg>
+ <name>contains</name>
+ <value>foobar</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>initial query - with minimal</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <header>
+ <name>Prefer</name>
+ <value>return=minimal</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/sync/24.xml</filepath>
+ </data>
+ <verify>
+ <callback>dataString</callback>
+ <arg>
+ <name>notcontains</name>
+ <value>foobar</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <end/>
+
+</caldavtest>
diff --git a/apps/dav/tests/testsuits/caldavtest/tests/CardDAV/current-user-principal.xml b/apps/dav/tests/testsuits/caldavtest/tests/CardDAV/current-user-principal.xml
new file mode 100644
index 00000000000..fc120a092dd
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/tests/CardDAV/current-user-principal.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ - SPDX-FileCopyrightText: 2006-2015 Apple Inc. All rights reserved.
+ - SPDX-License-Identifier: Apache-2.0
+-->
+
+<caldavtest>
+ <description>Test DAV:current-user-principal support</description>
+
+ <require-feature>
+ <feature>carddav</feature>
+ </require-feature>
+
+ <start/>
+
+ <test-suite name='Check for the property on /'>
+ <require-feature>
+ <feature>own-root</feature>
+ </require-feature>
+ <test name='1'>
+ <description>Check for authenticated property on /</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$root:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vcurrent-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value><![CDATA[{DAV:}current-user-principal$<D:href xmlns:D="DAV:">$principaluri1:</D:href>]]></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>Check for authenticated property on / (user02)</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <ruri>$root:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vcurrent-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value><![CDATA[{DAV:}current-user-principal$<D:href xmlns:D="DAV:">$principaluri2:</D:href>]]></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Check for the property on /principals/'>
+ <test name='1'>
+ <description>Check for authenticated property on /</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$principalcollection:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vcurrent-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value><![CDATA[{DAV:}current-user-principal$<D:href xmlns:D="DAV:">$principaluri1:</D:href>]]></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>Check for unauthenticated property on /</description>
+ <request auth="no">
+ <method>PROPFIND</method>
+ <ruri>$principalcollection:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vcurrent-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>401</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>Check for authenticated property on / (user02)</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <ruri>$principalcollection:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vcurrent-user-principal/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value><![CDATA[{DAV:}current-user-principal$<D:href xmlns:D="DAV:">$principaluri2:</D:href>]]></value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <end/>
+</caldavtest>
diff --git a/apps/dav/tests/testsuits/caldavtest/tests/CardDAV/sharing-addressbooks.xml b/apps/dav/tests/testsuits/caldavtest/tests/CardDAV/sharing-addressbooks.xml
new file mode 100644
index 00000000000..a9c1a84af44
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/tests/CardDAV/sharing-addressbooks.xml
@@ -0,0 +1,314 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ - SPDX-FileCopyrightText: 2006-2015 Apple Inc. All rights reserved.
+ - SPDX-License-Identifier: Apache-2.0
+-->
+
+<caldavtest>
+ <description>Test addressbook sharing</description>
+
+ <require-feature>
+ <feature>carddav</feature>
+ </require-feature>
+
+ <start>
+ </start>
+
+ <test-suite name='Read-write addressbook'>
+ <test name='1'>
+ <description>POST invitation</description>
+ <request>
+ <method>POST</method>
+ <ruri>$addressbookhome1:/addressbook/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/read-write/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>Shared addressbook exists</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <ruri>$addressbookhome2:/addressbook_shared_by_user01/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/read-write/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}owner/{DAV:}href[=$principaluri1:]</value>
+ <value>$verify-property-prefix:/{DAV:}resourcetype/{DAV:}collection</value>
+ <value>$verify-property-prefix:/{DAV:}resourcetype/{urn:ietf:params:xml:ns:carddav}addressbook</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}read</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}write</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}bind</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}unbind</value>
+ </arg>
+ <arg>
+ <name>notexists</name>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}admin</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}all</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+
+ <test name='4a'>
+ <description>Shared addressbook exists Depth:1</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <ruri>$addressbookhome2:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/read-write/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>parent</name>
+ <value>$multistatus-response-prefix:[^{DAV:}href=$addressbookhome2:/addressbook_shared_by_user01/]</value>
+ </arg>
+ <arg>
+ <name>exists</name>
+ <!--<value>$verify-response-prefix:/{DAV:}owner/{DAV:}href[=$principaluri1:]</value>-->
+ <value>$verify-response-prefix:/{DAV:}resourcetype/{DAV:}collection</value>
+ <value>$verify-response-prefix:/{DAV:}resourcetype/{urn:ietf:params:xml:ns:carddav}addressbook</value>
+ <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}read</value>
+ <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}write</value>
+ <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}bind</value>
+ <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}unbind</value>
+ </arg>
+ <arg>
+ <name>notexists</name>
+ <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}admin</value>
+ <value>$verify-response-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}all</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+
+ <test name='5'>
+ <description>Original addressbook unchanged</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$addressbookpath1:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/read-write/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}owner/{DAV:}href[=$principaluri1:]</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+
+ <test name='6'>
+ <description>Sharee creates contact</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PUT</method>
+ <ruri>$addressbookhome2:/addressbook_shared_by_user01/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/read-write/6.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+
+ <test name='7'>
+ <description>Sharer sees contact</description>
+ <request>
+ <method>GET</method>
+ <ruri>$addressbookpath1:/1.vcf</ruri>
+ <verify>
+ <callback>addressDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CardDAV/sharing/read-write/6.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+
+ <test name='8'>
+ <description>Sharer changes contact</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/read-write/7.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+
+ <test name='9'>
+ <description>Sharee sees changed contact</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GET</method>
+ <ruri>$addressbookhome2:/addressbook_shared_by_user01/1.vcf</ruri>
+ <verify>
+ <callback>addressDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CardDAV/sharing/read-write/7.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+
+ <test name='10'>
+ <description>Sharer creates contact</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/2.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/read-write/8.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='11'>
+ <description>Sharee sees new contact</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GET</method>
+ <ruri>$addressbookhome2:/addressbook_shared_by_user01/2.vcf</ruri>
+ <verify>
+ <callback>addressDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CardDAV/sharing/read-write/8.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='12'>
+ <description>Sharee changes contact</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PUT</method>
+ <ruri>$addressbookhome2:/addressbook_shared_by_user01/2.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/read-write/9.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='13'>
+ <description>Sharer sees changed contact</description>
+ <request>
+ <method>GET</method>
+ <ruri>$addressbookpath1:/2.vcf</ruri>
+ <verify>
+ <callback>addressDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CardDAV/sharing/read-write/9.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='14'>
+ <description>Un-share by delete</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>DELETE</method>
+ <ruri>$addressbookhome2:/addressbook_shared_by_user01/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='15'>
+ <description>Original address book still exists</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$addressbookhome1:/addressbook/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/read-write/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}owner/{DAV:}href[=$principaluri1:]</value>
+ <value>$verify-property-prefix:/{DAV:}resourcetype/{DAV:}collection</value>
+ <value>$verify-property-prefix:/{DAV:}resourcetype/{urn:ietf:params:xml:ns:carddav}addressbook</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}read</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}write</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}bind</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}unbind</value>
+ </arg>
+ <arg>
+ <name>notexists</name>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}admin</value>
+ <value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}all</value>
+ </arg>
+ </verify> </request>
+ </test>
+ <test name='16'>
+ <description>Shared addressbook no longer exists Depth:1</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PROPFIND</method>
+ <ruri>$addressbookhome2:</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/read-write/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>notexists</name>
+ <value>$multistatus-response-prefix:[^{DAV:}href=$addressbookhome2:/addressbook_shared_by_user01/]</value>
+ </arg>
+ </verify>
+ </request>
+ </test> </test-suite>
+
+ <end>
+ </end>
+
+</caldavtest>
diff --git a/apps/dav/tests/testsuits/caldavtest/tests/CardDAV/sync-report.xml b/apps/dav/tests/testsuits/caldavtest/tests/CardDAV/sync-report.xml
new file mode 100644
index 00000000000..bdd3c58e93b
--- /dev/null
+++ b/apps/dav/tests/testsuits/caldavtest/tests/CardDAV/sync-report.xml
@@ -0,0 +1,1591 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ - SPDX-FileCopyrightText: 2006-2015 Apple Inc. All rights reserved.
+ - SPDX-License-Identifier: Apache-2.0
+-->
+
+<caldavtest>
+ <require-feature>
+ <feature>carddav</feature>
+ <feature>sync-report</feature>
+ </require-feature>
+
+ <start>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/1.vcf</filepath>
+ </data>
+ </request>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/2.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/2.vcf</filepath>
+ </data>
+ </request>
+ </start>
+
+ <test-suite name='support-report-set'>
+ <test name='1'>
+ <description>Not on addressbooks</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$addressbooks:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>notexists</name>
+ <value>$verify-property-prefix:/{DAV:}supported-report-set/{DAV:}supported-report/{DAV:}report/{DAV:}sync-collection</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}supported-report-set</value>
+ </arg>
+ <arg>
+ <name>badprops</name>
+ <value>{DAV:}sync-token</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <!--
+ original test2 has been removed since we do not support sync support on addressbooks home
+ -->
+ <test name='3'>
+ <description>On addressbook</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}supported-report-set/{DAV:}supported-report/{DAV:}report/{DAV:}sync-collection</value>
+ <!-- verification below does not match -->
+ <!-- value>$verify-property-prefix:/{DAV:}sync-token[+data:,]</value -->
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}supported-report-set</value>
+ <value>{DAV:}sync-token</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - empty token - no props'>
+ <test name='1'>
+ <description>initial query - addressbook depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <!-- no sync on addressbook level -->
+ <!-- value>$calendar_sync_extra_items:</value -->
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <!-- test 2 and 3 require sync support on addressbook collection -->
+ <test name='4'>
+ <description>add new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/3.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='5'>
+ <description>new resource - addressbook depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <!-- no sync on addressbook level -->
+ <!-- value>$calendar_sync_extra_items:</value -->
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ <value>3.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <!-- test name='6'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>new resource - home depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>$addressbook:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='7'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>new resource - home depth:infinity</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/1.vcf</value>
+ <value>$addressbook:/2.vcf</value>
+ <value>$addressbook:/3.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test -->
+ <test name='8'>
+ <description>remove new resource</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='9'>
+ <description>remove new resource - addressbook depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <!-- no sync on addressbook level -->
+ <!--<value>$calendar_sync_extra_items:</value>-->
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <!--test name='10'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>remove new resource - home depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>$addressbook:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='11'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>remove new resource - home depth:infinity</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/1.vcf</value>
+ <value>$addressbook:/2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='12'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/1.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='13'>
+ <description>changed resource - addressbook depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='14'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>changed resource - home depth:1</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>$addressbook:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='15'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>changed resource - home depth:infinity</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/1.vcf</value>
+ <value>$addressbook:/2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ -->
+ </test-suite>
+
+ <!--
+ <test-suite name='simple reports - diff token - no props'>
+ <test name='1'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/3.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>3.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>badhrefs</name>
+ <value>3.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>remove resource (treated as old)</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>badhrefs</name>
+ <value>3.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='5'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/1.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='6'>
+ <description>no change</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - empty token - props'>
+ <test name='1'>
+ <description>initial query</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/3.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ <value>3.vcf</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>remove resource new resource</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/1.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - diff token - props'>
+ <test name='1'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/3.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>3.vcf</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>badhrefs</name>
+ <value>3.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>remove resource (treated as old)</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/7.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>badhrefs</name>
+ <value>3.vcf</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='5'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/1.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.vcf</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='6'>
+ <description>no change</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - diff token - no props - home depth:infinity'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>Initialize</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookpath1:/</ruri>
+ </request>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/1.vcf</filepath>
+ </data>
+ </request>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/2.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/2.vcf</filepath>
+ </data>
+ </request>
+ </test>
+ <test name='2'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/1.vcf</value>
+ <value>$addressbook:/2.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/3.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/3.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='4'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$addressbook:/3.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5'>
+ <description>remove resource (treated as old)</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$addressbook:/3.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='6'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/1.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/1.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='7'>
+ <description>no change</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - diff token - props - home depth:infinity'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$calendar_sync_extra_items:</value>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/1.vcf</value>
+ <value>$addressbook:/2.vcf</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/3.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/3.vcf</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$addressbook:/3.vcf</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>ignore</name>
+ <value>$addressbookpath1:/</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>ignore</name>
+ <value>$addressbookpath1:/3.vcf</value>
+ </arg>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>remove resource (treated as old)</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/7.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$addressbook:/3.vcf</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>count</name>
+ <value>2</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='5'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookpath1:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/1.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/1.vcf</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='6'>
+ <description>no change</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/6.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ </verify>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}getcontenttype</value>
+ <value>{DAV:}getetag</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - diff token - delete/create addressbook - home depth:infinity' ignore='yes'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1'>
+ <description>initial query - grab token</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>syncaddressbook3/</value>
+ <value>syncaddressbook3/1.vcf</value>
+ <value>syncaddressbook3/2.vcf</value>
+ <value>syncaddressbook4/</value>
+ <value>syncaddressbook4/1.vcf</value>
+ <value>syncaddressbook4/2.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2'>
+ <description>remove resource then addressbook</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookhome1:/syncaddressbook3/1.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookhome1:/syncaddressbook3/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>badhrefs</name>
+ <value>syncaddressbook3/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3'>
+ <description>add addressbook - test last sync</description>
+ <request end-delete="yes">
+ <method>MKCOL</method>
+ <ruri>$addressbookhome1:/syncaddressbook3/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/MKCOL/addressbook.xml</filepath>
+ </data>
+ </request>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>syncaddressbook3/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>add addressbook - test previous sync</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/sync/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>syncaddressbook3/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ </test-suite>
+-->
+
+ <end>
+ <request user="$useradmin:" pswd="$pswdadmin:">
+ <method>DELETEALL</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <ruri>$addressbookhome2:/</ruri>
+ <ruri>$notificationpath1:/</ruri>
+ <ruri>$notificationpath2:/</ruri>
+ </request>
+ </end>
+
+</caldavtest>
diff --git a/apps/dav/tests/testsuits/carddav/install.sh b/apps/dav/tests/testsuits/carddav/install.sh
new file mode 100644
index 00000000000..91c9079948d
--- /dev/null
+++ b/apps/dav/tests/testsuits/carddav/install.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+#
+# SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+# SPDX-License-Identifier: AGPL-3.0-only
+#
+SCRIPT=`realpath $0`
+SCRIPTPATH=`dirname $SCRIPT`
+
+
+cd "$SCRIPTPATH"
+if [ ! -f CalDAVTester/testcaldav.py ]; then
+ git clone https://github.com/apple/ccs-caldavtester.git CalDAVTester
+fi
+if [ ! -f pycalendar/setup.py ]; then
+ git clone https://github.com/apple/ccs-pycalendar.git pycalendar
+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/../../../../../"
diff --git a/apps/dav/tests/testsuits/carddav/script-new-endpoint.sh b/apps/dav/tests/testsuits/carddav/script-new-endpoint.sh
new file mode 100644
index 00000000000..f42876a0ade
--- /dev/null
+++ b/apps/dav/tests/testsuits/carddav/script-new-endpoint.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+#
+# SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
+# SPDX-License-Identifier: AGPL-3.0-or-later
+#
+SCRIPT=`realpath $0`
+SCRIPTPATH=`dirname $SCRIPT`
+
+# Move the endpoint to the serverinfo file
+cp "$SCRIPTPATH/../caldavtest/serverinfo-new-endpoint.xml" "$SCRIPTPATH/../caldavtest/serverinfo.xml"
+
+# start the server
+php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../../.." &
+
+sleep 30
+
+# run the tests
+cd "$SCRIPTPATH/CalDAVTester"
+PYTHONPATH="$SCRIPTPATH/pycalendar/src" python testcaldav.py --print-details-onfail --basedir "$SCRIPTPATH/../caldavtest/" -o cdt.txt \
+ "CardDAV/current-user-principal.xml" \
+ "CardDAV/sync-report.xml" \
+ "CardDAV/sharing-addressbooks.xml"
+
+
+RESULT=$?
+
+tail "$/../../../../../data-autotest/nextcloud.log"
+
+exit $RESULT
diff --git a/apps/dav/tests/testsuits/carddav/script-old-endpoint.sh b/apps/dav/tests/testsuits/carddav/script-old-endpoint.sh
new file mode 100644
index 00000000000..e5de79bfebb
--- /dev/null
+++ b/apps/dav/tests/testsuits/carddav/script-old-endpoint.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+#
+# SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
+# SPDX-License-Identifier: AGPL-3.0-or-later
+#
+SCRIPT=`realpath $0`
+SCRIPTPATH=`dirname $SCRIPT`
+
+# Move the endpoint to the serverinfo file
+cp "$SCRIPTPATH/../caldavtest/serverinfo-old-carddav-endpoint.xml" "$SCRIPTPATH/../caldavtest/serverinfo.xml"
+
+# start the server
+php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../../.." &
+
+
+# run the tests
+cd "$SCRIPTPATH/CalDAVTester"
+PYTHONPATH="$SCRIPTPATH/pycalendar/src" python testcaldav.py --print-details-onfail --basedir "$SCRIPTPATH/../caldavtest/" -o cdt.txt \
+ "CardDAV/current-user-principal.xml" \
+ "CardDAV/sync-report.xml"
+
+RESULT=$?
+
+tail "$/../../../../../data-autotest/nextcloud.log"
+
+exit $RESULT
diff --git a/apps/dav/tests/testsuits/carddav/script.sh b/apps/dav/tests/testsuits/carddav/script.sh
new file mode 100644
index 00000000000..8261d3189bf
--- /dev/null
+++ b/apps/dav/tests/testsuits/carddav/script.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+#
+# SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+# SPDX-License-Identifier: AGPL-3.0-only
+#
+SCRIPT=`realpath $0`
+SCRIPTPATH=`dirname $SCRIPT`
+
+# start the server
+php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../../.." &
+
+sleep 30
+
+# run the tests
+cd "$SCRIPTPATH/CalDAVTester"
+PYTHONPATH="$SCRIPTPATH/pycalendar/src" python testcaldav.py --print-details-onfail --basedir "$SCRIPTPATH/../caldavtest/" -o cdt.txt \
+ "CardDAV/current-user-principal.xml" \
+ "CardDAV/sync-report.xml" \
+ "CardDAV/sharing-addressbooks.xml"
+
+
+RESULT=$?
+
+tail "$/../../../../../data-autotest/nextcloud.log"
+
+exit $RESULT
diff --git a/apps/dav/tests/testsuits/litmus-v1/script.sh b/apps/dav/tests/testsuits/litmus-v1/script.sh
new file mode 100644
index 00000000000..d2da46904d4
--- /dev/null
+++ b/apps/dav/tests/testsuits/litmus-v1/script.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+#
+# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
+# SPDX-FileCopyrightText: 2015 ownCloud, Inc.
+# SPDX-License-Identifier: AGPL-3.0-only
+#
+SCRIPT=`realpath $0`
+SCRIPTPATH=`dirname $SCRIPT`
+
+
+# start the server
+php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../../.." &
+
+sleep 30
+
+# run the tests
+cd /tmp/litmus/litmus-0.13
+make URL=http://127.0.0.1:8888/remote.php/webdav CREDS="admin admin" TESTS="basic copymove props largefile" check
diff --git a/apps/dav/tests/testsuits/litmus-v2/script.sh b/apps/dav/tests/testsuits/litmus-v2/script.sh
new file mode 100644
index 00000000000..8b425228efb
--- /dev/null
+++ b/apps/dav/tests/testsuits/litmus-v2/script.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+#
+# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
+# SPDX-FileCopyrightText: 2015 ownCloud, Inc.
+# SPDX-License-Identifier: AGPL-3.0-only
+#
+SCRIPT=`realpath $0`
+SCRIPTPATH=`dirname $SCRIPT`
+
+
+# start the server
+php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../../.." &
+
+sleep 30
+
+# run the tests
+cd /tmp/litmus/litmus-0.13
+make URL=http://127.0.0.1:8888/remote.php/dav/files/admin CREDS="admin admin" TESTS="basic copymove props largefile" check