[CalendarServer-changes] [11606] CalendarServer/trunk/txdav/carddav/datastore
source_changes at macosforge.org
source_changes at macosforge.org
Wed Aug 14 13:52:56 PDT 2013
Revision: 11606
http://trac.calendarserver.org//changeset/11606
Author: gaya at apple.com
Date: 2013-08-14 13:52:56 -0700 (Wed, 14 Aug 2013)
Log Message:
-----------
enable shared addressbook sync report; add sharing sync report CalDAVTester tests
Modified Paths:
--------------
CalDAVTester/trunk/scripts/tests/CardDAV/sharing-sync.xml
CalendarServer/trunk/twistedcaldav/resource.py
CalendarServer/trunk/txdav/carddav/datastore/sql.py
Added Paths:
-----------
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/11.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/12.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/13.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/14.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/15.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/16.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/21.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/22.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/23.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/24.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/25.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/26.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/27.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/28.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/29.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/30.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/31.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/32.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/33.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/34.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/35.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/36.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/37.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/38.xml
CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/39.xml
Removed Paths:
-------------
CalDAVTester/trunk/Resource/CardDAV/vreports/sharing/
CalDAVTester/trunk/Resource/CardDAV/vreports/sync/10.xml
CalDAVTester/trunk/Resource/CardDAV/vreports/sync/11.xml
CalDAVTester/trunk/Resource/CardDAV/vreports/sync/12.xml
CalDAVTester/trunk/Resource/CardDAV/vreports/sync/13.xml
CalDAVTester/trunk/Resource/CardDAV/vreports/sync/14.xml
CalDAVTester/trunk/Resource/CardDAV/vreports/sync/15.xml
CalDAVTester/trunk/Resource/CardDAV/vreports/sync/16.xml
CalDAVTester/trunk/Resource/CardDAV/vreports/sync/17.xml
CalDAVTester/trunk/Resource/CardDAV/vreports/sync/18.xml
CalDAVTester/trunk/Resource/CardDAV/vreports/sync/19.xml
CalDAVTester/trunk/Resource/CardDAV/vreports/sync/20.xml
CalDAVTester/trunk/Resource/CardDAV/vreports/sync/8.xml
CalDAVTester/trunk/Resource/CardDAV/vreports/sync/9.xml
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/11.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/11.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/11.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<CS:share xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/">
+ <CS:set>
+ <D:href>$cuaddrurn1:</D:href>
+ <CS:summary>User 2s Shared Address Book</CS:summary>
+ <CS:read-write/>
+ </CS:set>
+</CS:share>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/12.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/12.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/12.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<invite-reply xmlns='http://calendarserver.org/ns/'>
+ <href xmlns='DAV:'>$cuaddrurn1:</href>
+ <invite-accepted/>
+ <hosturl>
+ <href xmlns='DAV:'>$addressbookpath2:</href>
+ </hosturl>
+ <in-reply-to>$inviteuid:</in-reply-to>
+ <summary>Shared Address Book</summary>
+ <common-name>$username1:</common-name>
+ <first-name>$firstname1:</first-name>
+ <last-name>$lastname1:</last-name>
+</invite-reply>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/13.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/13.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/13.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<CS:share xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/">
+ <CS:set>
+ <D:href>$cuaddrurn1:</D:href>
+ <CS:summary>User 3s Shared Address Book</CS:summary>
+ <CS:read-write/>
+ </CS:set>
+</CS:share>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/14.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/14.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/14.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<invite-reply xmlns='http://calendarserver.org/ns/'>
+ <href xmlns='DAV:'>$cuaddrurn1:</href>
+ <invite-accepted/>
+ <hosturl>
+ <href xmlns='DAV:'>$addressbookpath3:</href>
+ </hosturl>
+ <in-reply-to>$inviteuid:</in-reply-to>
+ <summary>Shared Address Book</summary>
+ <common-name>$username1:</common-name>
+ <first-name>$firstname1:</first-name>
+ <last-name>$lastname1:</last-name>
+</invite-reply>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/15.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/15.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/15.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<CS:share xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/">
+ <CS:set>
+ <D:href>$cuaddrurn1:</D:href>
+ <CS:summary>User 4s Shared Address Book</CS:summary>
+ <CS:read-write/>
+ </CS:set>
+</CS:share>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/16.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/16.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/16.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<invite-reply xmlns='http://calendarserver.org/ns/'>
+ <href xmlns='DAV:'>$cuaddrurn1:</href>
+ <invite-accepted/>
+ <hosturl>
+ <href xmlns='DAV:'>$addressbookpath4:</href>
+ </hosturl>
+ <in-reply-to>$inviteuid:</in-reply-to>
+ <summary>Shared Address Book</summary>
+ <common-name>$username1:</common-name>
+ <first-name>$firstname1:</first-name>
+ <last-name>$lastname1:</last-name>
+</invite-reply>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/21.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/21.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/21.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:supported-report-set/>
+<D:sync-token/>
+</D:prop>
+</D:propfind>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/22.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/22.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/22.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token/>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/23.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/23.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/23.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken1:</D:sync-token>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/24.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/24.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/24.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken2:</D:sync-token>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/25.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/25.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/25.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token/>
+<D:prop>
+<D:getcontenttype/>
+<D:getetag/>
+</D:prop>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/26.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/26.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/26.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken1:</D:sync-token>
+<D:prop>
+<D:getcontenttype/>
+<D:getetag/>
+</D:prop>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/27.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/27.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/27.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken2:</D:sync-token>
+<D:prop>
+<D:getcontenttype/>
+<D:getetag/>
+</D:prop>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/28.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/28.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/28.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token/>
+<D:sync-level>1</D:sync-level>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/29.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/29.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/29.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token/>
+<D:sync-level>infinity</D:sync-level>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/30.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/30.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/30.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token/>
+<D:sync-level>bogus</D:sync-level>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/31.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/31.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/31.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>null</D:sync-token>
+<D:prop>
+<D:getetag/>
+</D:prop>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/32.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/32.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/32.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken1:</D:sync-token>
+<D:sync-level>1</D:sync-level>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/33.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/33.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/33.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken2:</D:sync-token>
+<D:sync-level>1</D:sync-level>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/34.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/34.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/34.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token/>
+<D:sync-level>1</D:sync-level>
+<D:prop>
+<D:getcontenttype/>
+<D:getetag/>
+</D:prop>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/35.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/35.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/35.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken1:</D:sync-token>
+<D:sync-level>1</D:sync-level>
+<D:prop>
+<D:getcontenttype/>
+<D:getetag/>
+</D:prop>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/36.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/36.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/36.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken2:</D:sync-token>
+<D:sync-level>1</D:sync-level>
+<D:prop>
+<D:getcontenttype/>
+<D:getetag/>
+</D:prop>
+</D:sync-collection>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/37.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/37.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/37.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:">
+<D:set>
+<D:prop>
+<D:details>My Name</D:details>
+</D:prop>
+</D:set>
+</D:propertyupdate>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/38.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/38.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/38.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:">
+<D:remove>
+<D:prop>
+<D:details/>
+</D:prop>
+</D:remove>
+</D:propertyupdate>
Added: CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/39.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/39.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/sync/addressbook/39.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:set>
+<D:prop>
+<C:schedule-default-calendar-URL><D:href>$calendarhome1:/synccalendar3/</D:href></C:schedule-default-calendar-URL>
+</D:prop>
+</D:set>
+</D:propertyupdate>
Deleted: CalDAVTester/trunk/Resource/CardDAV/vreports/sync/10.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/vreports/sync/10.xml 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalDAVTester/trunk/Resource/CardDAV/vreports/sync/10.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<D:sync-collection xmlns:D="DAV:">
-<D:sync-token/>
-<D:sync-level>bogus</D:sync-level>
-</D:sync-collection>
Deleted: CalDAVTester/trunk/Resource/CardDAV/vreports/sync/11.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/vreports/sync/11.xml 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalDAVTester/trunk/Resource/CardDAV/vreports/sync/11.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<D:sync-collection xmlns:D="DAV:">
-<D:sync-token>null</D:sync-token>
-<D:prop>
-<D:getetag/>
-</D:prop>
-</D:sync-collection>
Deleted: CalDAVTester/trunk/Resource/CardDAV/vreports/sync/12.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/vreports/sync/12.xml 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalDAVTester/trunk/Resource/CardDAV/vreports/sync/12.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<D:sync-collection xmlns:D="DAV:">
-<D:sync-token>$synctoken1:</D:sync-token>
-<D:sync-level>1</D:sync-level>
-</D:sync-collection>
Deleted: CalDAVTester/trunk/Resource/CardDAV/vreports/sync/13.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/vreports/sync/13.xml 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalDAVTester/trunk/Resource/CardDAV/vreports/sync/13.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<D:sync-collection xmlns:D="DAV:">
-<D:sync-token>$synctoken2:</D:sync-token>
-<D:sync-level>1</D:sync-level>
-</D:sync-collection>
Deleted: CalDAVTester/trunk/Resource/CardDAV/vreports/sync/14.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/vreports/sync/14.xml 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalDAVTester/trunk/Resource/CardDAV/vreports/sync/14.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<D:sync-collection xmlns:D="DAV:">
-<D:sync-token/>
-<D:sync-level>1</D:sync-level>
-<D:prop>
-<D:getcontenttype/>
-<D:getetag/>
-</D:prop>
-</D:sync-collection>
Deleted: CalDAVTester/trunk/Resource/CardDAV/vreports/sync/15.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/vreports/sync/15.xml 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalDAVTester/trunk/Resource/CardDAV/vreports/sync/15.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<D:sync-collection xmlns:D="DAV:">
-<D:sync-token>$synctoken1:</D:sync-token>
-<D:sync-level>1</D:sync-level>
-<D:prop>
-<D:getcontenttype/>
-<D:getetag/>
-</D:prop>
-</D:sync-collection>
Deleted: CalDAVTester/trunk/Resource/CardDAV/vreports/sync/16.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/vreports/sync/16.xml 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalDAVTester/trunk/Resource/CardDAV/vreports/sync/16.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<D:sync-collection xmlns:D="DAV:">
-<D:sync-token>$synctoken2:</D:sync-token>
-<D:sync-level>1</D:sync-level>
-<D:prop>
-<D:getcontenttype/>
-<D:getetag/>
-</D:prop>
-</D:sync-collection>
Deleted: CalDAVTester/trunk/Resource/CardDAV/vreports/sync/17.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/vreports/sync/17.xml 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalDAVTester/trunk/Resource/CardDAV/vreports/sync/17.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<D:propertyupdate xmlns:D="DAV:">
-<D:set>
-<D:prop>
-<D:details>My Name</D:details>
-</D:prop>
-</D:set>
-</D:propertyupdate>
Deleted: CalDAVTester/trunk/Resource/CardDAV/vreports/sync/18.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/vreports/sync/18.xml 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalDAVTester/trunk/Resource/CardDAV/vreports/sync/18.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<D:propertyupdate xmlns:D="DAV:">
-<D:remove>
-<D:prop>
-<D:details/>
-</D:prop>
-</D:remove>
-</D:propertyupdate>
Deleted: CalDAVTester/trunk/Resource/CardDAV/vreports/sync/19.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/vreports/sync/19.xml 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalDAVTester/trunk/Resource/CardDAV/vreports/sync/19.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
-<D:set>
-<D:prop>
-<C:schedule-default-calendar-URL><D:href>$calendarhome1:/synccalendar3/</D:href></C:schedule-default-calendar-URL>
-</D:prop>
-</D:set>
-</D:propertyupdate>
Deleted: CalDAVTester/trunk/Resource/CardDAV/vreports/sync/20.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/vreports/sync/20.xml 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalDAVTester/trunk/Resource/CardDAV/vreports/sync/20.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
-<D:set>
-<D:prop>
-<C:schedule-default-calendar-URL><D:href>$calendarpath1:/</D:href></C:schedule-default-calendar-URL>
-</D:prop>
-</D:set>
-</D:propertyupdate>
Deleted: CalDAVTester/trunk/Resource/CardDAV/vreports/sync/8.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/vreports/sync/8.xml 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalDAVTester/trunk/Resource/CardDAV/vreports/sync/8.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<D:sync-collection xmlns:D="DAV:">
-<D:sync-token/>
-<D:sync-level>1</D:sync-level>
-</D:sync-collection>
Deleted: CalDAVTester/trunk/Resource/CardDAV/vreports/sync/9.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/vreports/sync/9.xml 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalDAVTester/trunk/Resource/CardDAV/vreports/sync/9.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<D:sync-collection xmlns:D="DAV:">
-<D:sync-token/>
-<D:sync-level>infinity</D:sync-level>
-</D:sync-collection>
Modified: CalDAVTester/trunk/scripts/tests/CardDAV/sharing-sync.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CardDAV/sharing-sync.xml 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/sharing-sync.xml 2013-08-14 20:52:56 UTC (rev 11606)
@@ -430,7 +430,7 @@
</request>
</test>
<test name='8'>
- <description>Sharer changes event</description>
+ <description>Sharer changes vcard</description>
<request print-response='no'>
<method>PUT</method>
<ruri>$addressbookpath1:/1.vcf</ruri>
@@ -563,7 +563,7 @@
</request>
</test>
<test name='10'>
- <description>Sharee deletes event</description>
+ <description>Sharee deletes vcard</description>
<request user="$userid2:" pswd="$pswd2:" print-response='no'>
<method>DELETE</method>
<ruri>$addressbookhome2:/$sharedaddressbook:/1.vcf</ruri>
@@ -821,14 +821,3247 @@
</request>
</test>
</test-suite>
+
+ <test-suite name='support-report-set/sync-token property' ignore='no'>
+ <test name='0' ignore='no'>
+ <description>clean up old data</description>
+ <request user="$useradmin:" pswd="$pswdadmin:">
+ <method>DELETEALL</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <ruri>$addressbookhome2:/</ruri>
+ <ruri>$addressbookhome3:/</ruri>
+ <ruri>$addressbookhome4:/</ruri>
+ <ruri>$notificationpath1:/</ruri>
+ </request>
+ <description>add 2 vcards to user1 address book</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>
+ </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>
+
+ <description>share user2 address book with user1</description>
+ <description>user2 POSTs invitation</description>
+ <request user="$userid2:" pswd="$pswd2:" print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookpath2:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/11.xml</filepath>
+ </data>
+ </request>
+ <description>Check user1 notification collection and get invite uid</description>
+ <request print-response="no">
+ <method>WAITCOUNT 1</method>
+ <ruri>$notificationpath1:/</ruri>
+ </request>
+ <request print-response="no">
+ <method>GETNEW</method>
+ <ruri>$notificationpath1:/</ruri>
+ <grabelement>
+ <name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+ <variable>$inviteuid:</variable>
+ </grabelement>
+ </request>
+ <description>user1 replies ACCEPTED and deletes inviteUID from notification collection</description>
+ <request print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <data substitutions="yes">
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/12.xml</filepath>
+ </data>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$notificationpath1:/$inviteuid:</ruri>
+ </request>
+ <description>add 2 vcards to user2 address book</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PUT</method>
+ <ruri>$addressbookpath2:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/3.vcf</filepath>
+ </data>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PUT</method>
+ <ruri>$addressbookpath2:/2.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/4.vcf</filepath>
+ </data>
+ </request>
+ </test>
+ <test name='1' ignore='no'>
+ <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/sharing/sync/addressbook/21.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='2' ignore='no'>
+ <description>On addressbook-home</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/21.xml</filepath>
+ </data>
+ <verify>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <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>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}supported-report-set</value>
+ <value>{DAV:}sync-token</value>
+ </arg>
+ </verify>
+ <verify>
+ <exclude-feature>
+ <feature>sync-report-home</feature>
+ </exclude-feature>
+ <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>
+ <exclude-feature>
+ <feature>sync-report-home</feature>
+ </exclude-feature>
+ <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' ignore='no'>
+ <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/sharing/sync/addressbook/21.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 name='4' ignore='no'>
+ <description>On shared addressbook</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$addressbookhome1:/$userid2:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/21.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 name='5'>
+ <description>Look for options header tag on principal</description>
+ <request print-response="no">
+ <method>OPTIONS</method>
+ <ruri>$principal1:</ruri>
+ <verify>
+ <callback>header</callback>
+ <arg>
+ <name>header</name>
+ <value>*DAV$.*calendarserver-home-sync[^-]*</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - sync-level' ignore='no'>
+ <test name='1' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:1, depth:0</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/28.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$userid2:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:1, depth:1</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/28.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$userid2:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:1, depth:infinity</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/28.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$userid2:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:infinity, depth:0</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/29.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/1.vcf</value>
+ <value>$addressbook:/2.vcf</value>
+ <value>$userid2:/</value>
+ <value>$userid2:/1.vcf</value>
+ <value>$userid2:/2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:infinity, depth:1</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/29.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/1.vcf</value>
+ <value>$addressbook:/2.vcf</value>
+ <value>$userid2:/</value>
+ <value>$userid2:/1.vcf</value>
+ <value>$userid2:/2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:infinity, depth:infinity</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/29.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/1.vcf</value>
+ <value>$addressbook:/2.vcf</value>
+ <value>$userid2:/</value>
+ <value>$userid2:/1.vcf</value>
+ <value>$userid2:/2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='7' ignore='no'>
+ <description>sync-level:1, depth:0</description>
+ <request print-response='no'>
+ <method>REPORT</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/sync/addressbook/28.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='8' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:1, depth:1</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/28.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='9' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:1, depth:infinity</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/28.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='10' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:infinity, depth:0</description>
+ <request print-response='no'>
+ <method>REPORT</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/sync/addressbook/29.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='11' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:infinity, depth:1</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/29.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='12' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>sync-level:infinity, depth:infinity</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/29.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='13' ignore='no'>
+ <description>Bad sync-level</description>
+ <request print-response='no'>
+ <method>REPORT</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/sync/addressbook/30.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>400</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - empty token - no props' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>initial query - addressbook depth:1</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>initial query - home depth:1</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$userid2:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>initial query - home depth:infinity</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/1.vcf</value>
+ <value>$addressbook:/2.vcf</value>
+ <value>$userid2:/</value>
+ <value>$userid2:/1.vcf</value>
+ <value>$userid2:/2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <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' ignore='no'>
+ <description>new resource - addressbook depth:1</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ <value>3.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>new resource - home depth:1</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$userid2:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='7' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>new resource - home depth:infinity</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/1.vcf</value>
+ <value>$addressbook:/2.vcf</value>
+ <value>$addressbook:/3.vcf</value>
+ <value>$userid2:/</value>
+ <value>$userid2:/1.vcf</value>
+ <value>$userid2:/2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='8' ignore='no'>
+ <description>remove new resource</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='9' ignore='no'>
+ <description>remove new resource - addressbook depth:1</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='10' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>remove new resource - home depth:1</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$userid2:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='11' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>remove new resource - home depth:infinity</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/1.vcf</value>
+ <value>$addressbook:/2.vcf</value>
+ <value>$userid2:/</value>
+ <value>$userid2:/1.vcf</value>
+ <value>$userid2:/2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='12' ignore='no'>
+ <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' ignore='no'>
+ <description>changed resource - addressbook depth:1</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.vcf</value>
+ <value>2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='14' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>changed resource - home depth:1</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$userid2:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='15' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <description>changed resource - home depth:infinity</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$addressbook:/1.vcf</value>
+ <value>$addressbook:/2.vcf</value>
+ <value>$userid2:/</value>
+ <value>$userid2:/1.vcf</value>
+ <value>$userid2:/2.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - diff token - no props - addressbook depth:1' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>initial query - grab token</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <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' ignore='no'>
+ <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 print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/23.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' ignore='no'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/23.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>badhrefs</name>
+ <value>3.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>remove resource (treated as old)</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/24.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' ignore='no'>
+ <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 print-response='no'>
+ <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/sharing/sync/addressbook/23.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' ignore='no'>
+ <description>no change</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/23.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' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>initial query</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/25.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <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' ignore='no'>
+ <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 print-response='no'>
+ <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/sharing/sync/addressbook/25.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <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' ignore='no'>
+ <description>remove resource new resource</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/25.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <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' ignore='no'>
+ <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 print-response='no'>
+ <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/sharing/sync/addressbook/25.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <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' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>initial query - grab token</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/25.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <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' ignore='no'>
+ <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 print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/26.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' ignore='no'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookpath1:/3.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/26.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>badhrefs</name>
+ <value>3.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>remove resource (treated as old)</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/27.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' ignore='no'>
+ <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 print-response='no'>
+ <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/sharing/sync/addressbook/26.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' ignore='no'>
+ <description>no change</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/26.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' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1' ignore='no'>
+ <description>Initialize</description>
+ <description>clear user1 address book and unshare user2 address book</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:" print-response='no'>
+ <method>DELETE</method>
+ <ruri>$addressbookpath2:/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>DELETEALL</method>
+ <ruri>$notificationpath1:/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <description>share user3 address book with user1</description>
+ <description>user3 POSTs invitation</description>
+ <request user="$userid3:" pswd="$pswd3:" print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookpath3:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/13.xml</filepath>
+ </data>
+ </request>
+ <description>Check user1 notification collection and get invite uid</description>
+ <request print-response="no">
+ <method>WAITCOUNT 1</method>
+ <ruri>$notificationpath1:/</ruri>
+ </request>
+ <request print-response="no">
+ <method>GETNEW</method>
+ <ruri>$notificationpath1:/</ruri>
+ <grabelement>
+ <name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+ <variable>$inviteuid:</variable>
+ </grabelement>
+ </request>
+ <description>user1 replies ACCEPTED and deletes inviteUID from notification collection</description>
+ <request print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <data substitutions="yes">
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/14.xml</filepath>
+ </data>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$notificationpath1:/$inviteuid:</ruri>
+ </request>
+ <description>add 2 vcards to user3 address book</description>
+ <request user="$userid3:" pswd="$pswd3:">
+ <method>PUT</method>
+ <ruri>$addressbookpath3:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/5.vcf</filepath>
+ </data>
+ </request>
+ <request user="$userid3:" pswd="$pswd3:">
+ <method>PUT</method>
+ <ruri>$addressbookpath3:/2.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/6.vcf</filepath>
+ </data>
+ </request>
+
+ <description>share user4 address book with user1</description>
+ <description>user4 POSTs invitation</description>
+ <request user="$userid4:" pswd="$pswd4:" print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookpath4:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/15.xml</filepath>
+ </data>
+ </request>
+ <description>Check user1 notification collection and get invite uid</description>
+ <request print-response="no">
+ <method>WAITCOUNT 1</method>
+ <ruri>$notificationpath1:/</ruri>
+ </request>
+ <request print-response="no">
+ <method>GETNEW</method>
+ <ruri>$notificationpath1:/</ruri>
+ <grabelement>
+ <name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+ <variable>$inviteuid:</variable>
+ </grabelement>
+ </request>
+ <description>user1 replies ACCEPTED and deletes inviteUID from notification collection</description>
+ <request print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <data substitutions="yes">
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/16.xml</filepath>
+ </data>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$notificationpath1:/$inviteuid:</ruri>
+ </request>
+ <description>add 2 vcards to user4 address book</description>
+ <request user="$userid4:" pswd="$pswd4:">
+ <method>PUT</method>
+ <ruri>$addressbookpath4:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/7.vcf</filepath>
+ </data>
+ </request>
+ <request user="$userid4:" pswd="$pswd4:">
+ <method>PUT</method>
+ <ruri>$addressbookpath4:/2.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/8.vcf</filepath>
+ </data>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>initial query - grab token</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$userid3:/</value>
+ <value>$userid3:/1.vcf</value>
+ <value>$userid3:/2.vcf</value>
+ <value>$userid4:/</value>
+ <value>$userid4:/1.vcf</value>
+ <value>$userid4:/2.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookhome1:/$userid3:/3.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/9.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/23.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</value>
+ <value>$userid3:/3.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookhome1:/$userid3:/3.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/23.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$userid3:/3.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5' ignore='no'>
+ <description>remove resource (treated as old)</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/24.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$userid3:/3.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookhome1:/$userid3:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/5.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/23.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</value>
+ <value>$userid3:/1.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='7' ignore='no'>
+ <description>no change</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/23.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' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1' ignore='no'>
+ <description>initial query - grab token</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/25.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$userid3:/</value>
+ <value>$userid3:/1.vcf</value>
+ <value>$userid3:/2.vcf</value>
+ <value>$userid4:/</value>
+ <value>$userid4:/1.vcf</value>
+ <value>$userid4:/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' ignore='no'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookhome1:/$userid4:/3.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/12.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/26.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid4:/</value>
+ <value>$userid4:/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' ignore='no'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookhome1:/$userid4:/3.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/26.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid4:/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$userid4:/3.vcf</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>remove resource (treated as old)</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/27.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid4:/</value>
+ </arg>
+ <arg>
+ <name>badhrefs</name>
+ <value>$userid4:/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' ignore='no'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookhome1:/$userid4:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/7.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/26.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid4:/</value>
+ <value>$userid4:/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' ignore='no'>
+ <description>no change</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/26.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='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1' ignore='no'>
+ <description>initial query - grab token</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$userid3:/</value>
+ <value>$userid3:/1.vcf</value>
+ <value>$userid3:/2.vcf</value>
+ <value>$userid4:/</value>
+ <value>$userid4:/1.vcf</value>
+ <value>$userid4:/2.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>remove resource then addressbook</description>
+ <request user="$userid3:" pswd="$pswd3:" print-response='no'>
+ <method>DELETE</method>
+ <ruri>$addressbookpath3:/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>DELETEALL</method>
+ <ruri>$notificationpath1:/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/23.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>badhrefs</name>
+ <value>$userid3:/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>add addressbook - test last sync</description>
+ <description>share user3 address book with user1</description>
+ <description>user3 POSTs invitation</description>
+ <request user="$userid3:" pswd="$pswd3:" print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookpath3:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/13.xml</filepath>
+ </data>
+ </request>
+ <description>Check user1 notification collection and get invite uid</description>
+ <request print-response="no">
+ <method>WAITCOUNT 1</method>
+ <ruri>$notificationpath1:/</ruri>
+ </request>
+ <request print-response="no">
+ <method>GETNEW</method>
+ <ruri>$notificationpath1:/</ruri>
+ <grabelement>
+ <name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+ <variable>$inviteuid:</variable>
+ </grabelement>
+ </request>
+ <description>user1 replies ACCEPTED and deletes inviteUID from notification collection</description>
+ <request print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <data substitutions="yes">
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/14.xml</filepath>
+ </data>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$notificationpath1:/$inviteuid:</ruri>
+ </request>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/24.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>add addressbook - test previous sync</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/23.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</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:1' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1' ignore='no'>
+ <description>Initialize</description>
+ <request user="$useradmin:" pswd="$pswdadmin:">
+ <method>DELETEALL</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <ruri>$addressbookhome2:/</ruri>
+ <ruri>$addressbookhome3:/</ruri>
+ <ruri>$addressbookhome4:/</ruri>
+ <ruri>$notificationpath1:/</ruri>
+ </request>
+ <description>share user3 address book with user1</description>
+ <description>user3 POSTs invitation</description>
+ <request user="$userid3:" pswd="$pswd3:" print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookpath3:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/13.xml</filepath>
+ </data>
+ </request>
+ <description>Check user1 notification collection and get invite uid</description>
+ <request print-response="no">
+ <method>WAITCOUNT 1</method>
+ <ruri>$notificationpath1:/</ruri>
+ </request>
+ <request print-response="no">
+ <method>GETNEW</method>
+ <ruri>$notificationpath1:/</ruri>
+ <grabelement>
+ <name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+ <variable>$inviteuid:</variable>
+ </grabelement>
+ </request>
+ <description>user1 replies ACCEPTED and deletes inviteUID from notification collection</description>
+ <request print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <data substitutions="yes">
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/14.xml</filepath>
+ </data>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$notificationpath1:/$inviteuid:</ruri>
+ </request>
+ <description>add 2 vcards to user3 address book</description>
+ <request user="$userid3:" pswd="$pswd3:">
+ <method>PUT</method>
+ <ruri>$addressbookpath3:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/5.vcf</filepath>
+ </data>
+ </request>
+ <request user="$userid3:" pswd="$pswd3:">
+ <method>PUT</method>
+ <ruri>$addressbookpath3:/2.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/6.vcf</filepath>
+ </data>
+ </request>
+
+ <description>share user4 address book with user1</description>
+ <description>user4 POSTs invitation</description>
+ <request user="$userid4:" pswd="$pswd4:" print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookpath4:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/15.xml</filepath>
+ </data>
+ </request>
+ <description>Check user1 notification collection and get invite uid</description>
+ <request print-response="no">
+ <method>WAITCOUNT 1</method>
+ <ruri>$notificationpath1:/</ruri>
+ </request>
+ <request print-response="no">
+ <method>GETNEW</method>
+ <ruri>$notificationpath1:/</ruri>
+ <grabelement>
+ <name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+ <variable>$inviteuid:</variable>
+ </grabelement>
+ </request>
+ <description>user1 replies ACCEPTED and deletes inviteUID from notification collection</description>
+ <request print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <data substitutions="yes">
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/16.xml</filepath>
+ </data>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$notificationpath1:/$inviteuid:</ruri>
+ </request>
+ <description>add 2 vcards to user4 address book</description>
+ <request user="$userid4:" pswd="$pswd4:">
+ <method>PUT</method>
+ <ruri>$addressbookpath4:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/7.vcf</filepath>
+ </data>
+ </request>
+ <request user="$userid4:" pswd="$pswd4:">
+ <method>PUT</method>
+ <ruri>$addressbookpath4:/2.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/8.vcf</filepath>
+ </data>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>initial query - grab token</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/28.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$userid3:/</value>
+ <value>$userid4:/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookhome1:/$userid3:/3.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/9.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/32.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookhome1:/$userid3:/3.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/32.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5' ignore='no'>
+ <description>remove resource (treated as old)</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/33.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookhome1:/$userid3:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/5.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/32.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='7' ignore='no'>
+ <description>no change</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/32.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' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1' ignore='no'>
+ <description>initial query - grab token</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/34.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$userid3:/</value>
+ <value>$userid4:/</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' ignore='no'>
+ <description>new resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookhome1:/$userid4:/3.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/10.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/35.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid4:/</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' ignore='no'>
+ <description>remove resource (treated as new)</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookhome1:/$userid4:/3.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/35.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid4:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>remove resource (treated as old)</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/36.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid4:/</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' ignore='no'>
+ <description>changed resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$addressbookhome1:/$userid4:/1.vcf</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/vreports/put/7.vcf</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/35.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid4:/</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' ignore='no'>
+ <description>no change</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/35.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:1' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1' ignore='no'>
+ <description>initial query - grab token</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/28.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$userid3:/</value>
+ <value>$userid4:/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>remove resource then addressbook</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookhome1:/$userid3:/1.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookhome1:/$userid3:/2.vcf</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$addressbookhome1:/$userid3:/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/32.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>badhrefs</name>
+ <value>$userid3:/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>add addressbook - test last sync</description>
+ <description>share user3 address book with user1</description>
+ <description>user3 POSTs invitation</description>
+ <request user="$userid3:" pswd="$pswd3:" print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookpath3:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/13.xml</filepath>
+ </data>
+ </request>
+ <description>Check user1 notification collection and get invite uid</description>
+ <request print-response="no">
+ <method>WAITCOUNT 1</method>
+ <ruri>$notificationpath1:/</ruri>
+ </request>
+ <request print-response="no">
+ <method>GETNEW</method>
+ <ruri>$notificationpath1:/</ruri>
+ <grabelement>
+ <name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+ <variable>$inviteuid:</variable>
+ </grabelement>
+ </request>
+ <description>user1 replies ACCEPTED and deletes inviteUID from notification collection</description>
+ <request print-response="no">
+ <method>POST</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <data substitutions="yes">
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/14.xml</filepath>
+ </data>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$notificationpath1:/$inviteuid:</ruri>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/33.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>add addressbook - test previous sync</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/32.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - empty inbox' ignore='yes'>
+ <test name='1' ignore='no'>
+ <description>initial query</description>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$inboxpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>1</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='simple reports - valid token' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>initial query</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/31.xml</filepath>
+ </data>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}valid-sync-token</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='addressbook webdav property change - home depth:infinity' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1' ignore='no'>
+ <description>initial query - grab token</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/22.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$userid3:/</value>
+ <value>$userid4:/</value>
+ <value>$userid4:/1.vcf</value>
+ <value>$userid4:/2.vcf</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Change a property</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$addressbookhome1:/$userid3:/</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/37.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/23.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</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' ignore='no'>
+ <description>Remove a property</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$addressbookhome1:/$userid3:/</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/38.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/23.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</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='addressbook webdav property change - home depth:1' ignore='no'>
+ <require-feature>
+ <feature>sync-report-home</feature>
+ </require-feature>
+ <test name='1' ignore='no'>
+ <description>initial query - grab token</description>
+ <request print-response='no'>
+ <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/sharing/sync/addressbook/28.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$addressbook:/</value>
+ <value>$userid3:/</value>
+ <value>$userid4:/</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>/{DAV:}multistatus/{DAV:}sync-token</name>
+ <variable>$synctoken1:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Change a property</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$addressbookhome1:/$userid3:/</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/37.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/32.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</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' ignore='no'>
+ <description>Remove a property</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$addressbookhome1:/$userid3:/</ruri>
+ <data>
+ <content-type>text/vcard; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/38.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <method>REPORT</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>infinity</value>
+ </header>
+ <data substitutions='yes'>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/sharing/sync/addressbook/32.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>$userid3:/</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>
+
<end>
<request user="$useradmin:" pswd="$pswdadmin:">
<method>DELETEALL</method>
<ruri>$addressbookhome1:/</ruri>
<ruri>$addressbookhome2:/</ruri>
+ <ruri>$addressbookhome3:/</ruri>
+ <ruri>$addressbookhome4:/</ruri>
<ruri>$notificationpath1:/</ruri>
<ruri>$notificationpath2:/</ruri>
+ <ruri>$notificationpath3:/</ruri>
+ <ruri>$notificationpath4:/</ruri>
</request>
</end>
Modified: CalendarServer/trunk/twistedcaldav/resource.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/resource.py 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalendarServer/trunk/twistedcaldav/resource.py 2013-08-14 20:52:56 UTC (rev 11606)
@@ -1125,9 +1125,7 @@
result.append(element.Report(carddavxml.AddressBookMultiGet(),))
if (
self.isPseudoCalendarCollection() or
- (self.isAddressBookCollection()
- and not self.isShareeResource()) # TEMP: Disable sync report in shared address books
- or
+ self.isAddressBookCollection() or
self.isNotificationCollection()
) and config.EnableSyncReport:
# Only allowed on calendar/inbox/addressbook/notification collections
@@ -2692,22 +2690,6 @@
self.http_MKCALENDAR = None
- @inlineCallbacks
- def report_DAV__sync_collection(self, request, sync_collection):
- """
- Generate a sync-collection REPORT.
- """
- # not supported on shared addressbooks
- if len((yield self._newStoreHome.listChildren())) > 1:
- self.log.error("sync-collection report is not allowed on address book homes containing shared address books: %s" % (self,))
- raise HTTPError(ErrorResponse(
- responsecode.FORBIDDEN,
- element.SupportedReport(),
- "Report not supported on this resource",
- ))
-
- returnValue((yield super(AddressBookHomeResource, self).report_DAV__sync_collection(request, sync_collection)))
-
@classmethod
@inlineCallbacks
def homeFromTransaction(cls, transaction, uid):
Modified: CalendarServer/trunk/txdav/carddav/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/carddav/datastore/sql.py 2013-08-14 18:57:26 UTC (rev 11605)
+++ CalendarServer/trunk/txdav/carddav/datastore/sql.py 2013-08-14 20:52:56 UTC (rev 11606)
@@ -589,8 +589,8 @@
self._groupForSharedAddressBookName(), # obj.RESOURCE_NAME, shared name is UID and thus avoids collisions
self._groupForSharedAddressBookUID(), # obj.UID, shared name is uuid
_ABO_KIND_GROUP, # obj.KIND,
- "1", # obj.MD5, unused
- "1", # Len(obj.TEXT), unused
+ "1", # obj.MD5, non-zero temporary value; set to correct value when known
+ "1", # Len(obj.TEXT), non-zero temporary value; set to correct value when known
self._created, # obj.CREATED,
self._modified, # obj.CREATED,
]
@@ -611,7 +611,7 @@
fn = n
uid = self._groupForSharedAddressBookUID()
- # store bridge should substitute principal name and full name
+ # storebridge should substitute principal name and full name
# owner = yield CalDAVResource.principalForUID(self.ownerHome().uid())
# n = owner.name()
# fn = owner.displayName()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130814/188b31a8/attachment-0001.html>
More information about the calendarserver-changes
mailing list