[CalendarServer-changes] [5602] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Fri May 14 13:16:53 PDT 2010


Revision: 5602
          http://trac.macosforge.org/projects/calendarserver/changeset/5602
Author:   cdaboo at apple.com
Date:     2010-05-14 13:16:51 -0700 (Fri, 14 May 2010)
Log Message:
-----------
Tests for address book sharing.

Modified Paths:
--------------
    CalDAVTester/trunk/Resource/CalDAV/sharing/replies/accept/7.xml
    CalDAVTester/trunk/Resource/CalDAV/sharing/setup/7.xml
    CalDAVTester/trunk/scripts/server/serverinfo.xml

Added Paths:
-----------
    CalDAVTester/trunk/Resource/CardDAV/sharing/
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/1.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/2.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/3.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/4.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/5.vcf
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/6.vcf
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/1.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/2.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/3.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/4.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/5.vcf
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/6.vcf
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/7.vcf
    CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/8.vcf
    CalDAVTester/trunk/Resource/CardDAV/sharing/feature/
    CalDAVTester/trunk/Resource/CardDAV/sharing/feature/allowed/
    CalDAVTester/trunk/Resource/CardDAV/sharing/feature/allowed/1.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/feature/downgrade_collection/
    CalDAVTester/trunk/Resource/CardDAV/sharing/feature/downgrade_collection/1.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/feature/upgrade_collection/
    CalDAVTester/trunk/Resource/CardDAV/sharing/feature/upgrade_collection/1.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/
    CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/nonglobal/
    CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/nonglobal/1.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/nonglobal/2.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/nonglobal/3.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/shadowable/
    CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/shadowable/1.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/shadowable/2.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/shadowable/3.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/replies/
    CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/
    CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/1.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/2.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/3.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/4.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/5.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/6.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/7.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/
    CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/1.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/2.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/3.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/4.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/setup/
    CalDAVTester/trunk/Resource/CardDAV/sharing/setup/1.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/setup/2.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/setup/3.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/setup/4.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/setup/5.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/setup/6.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/setup/7.xml
    CalDAVTester/trunk/Resource/CardDAV/sharing/unshare/
    CalDAVTester/trunk/Resource/CardDAV/sharing/unshare/shareedelete/
    CalDAVTester/trunk/Resource/CardDAV/sharing/unshare/shareedelete/1.vcf
    CalDAVTester/trunk/Resource/Common/MKCOL/sharedaddressbook.xml
    CalDAVTester/trunk/scripts/tests/CardDAV/sharing-addressbooks.xml
    CalDAVTester/trunk/scripts/tests/CardDAV/sharing-feature.xml
    CalDAVTester/trunk/scripts/tests/CardDAV/sharing-peruser-properties.xml
    CalDAVTester/trunk/scripts/tests/CardDAV/sharing-replies.xml
    CalDAVTester/trunk/scripts/tests/CardDAV/sharing-unshare.xml

Modified: CalDAVTester/trunk/Resource/CalDAV/sharing/replies/accept/7.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/replies/accept/7.xml	2010-05-14 19:41:08 UTC (rev 5601)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/replies/accept/7.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -1,4 +1,4 @@
 <?xml version='1.0' encoding='UTF-8'?>
-<shared-calendar xmlns='http://calendarserver.org/ns/'>
+<shared-as xmlns='http://calendarserver.org/ns/'>
   <href xmlns='DAV:'></href>
-</shared-calendar>
+</shared-as>

Modified: CalDAVTester/trunk/Resource/CalDAV/sharing/setup/7.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/setup/7.xml	2010-05-14 19:41:08 UTC (rev 5601)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/setup/7.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -1,4 +1,4 @@
 <?xml version='1.0' encoding='UTF-8'?>
-<shared-calendar xmlns='http://calendarserver.org/ns/'>
+<shared-as xmlns='http://calendarserver.org/ns/'>
   <href xmlns='DAV:'></href>
-</shared-calendar>
+</shared-as>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/1.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/1.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -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>$cuaddr2:</D:href>
+        <CS:summary>My Shared Address Book</CS:summary>
+        <CS:read/>
+    </CS:set>
+</CS:share>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/2.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/2.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='UTF-8'?><notification xmlns='http://calendarserver.org/ns/'>
+  <dtstamp></dtstamp>
+  <invite-notification shared-type='addressbook'>
+    <uid></uid>
+    <href xmlns='DAV:'>$principaluri2:</href>
+    <invite-accepted/>
+    <access>
+      <read/>
+    </access>
+    <hosturl>
+      <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+    </hosturl>
+    <organizer>
+      <href xmlns='DAV:'>$principaluri1:</href>
+      <common-name>User 01</common-name>
+    </organizer>
+    <summary>My Shared Address Book</summary>
+  </invite-notification>
+</notification>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/3.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/3.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/3.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<invite-reply xmlns='http://calendarserver.org/ns/'>
+  <href xmlns='DAV:'>$principaluri2:</href>
+  <invite-accepted/>
+  <hosturl>
+    <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+  </hosturl>
+  <in-reply-to>$inviteuid:</in-reply-to>
+  <summary>The Shared Address Book</summary>
+</invite-reply>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/4.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/4.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/4.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:resourcetype/>
+<D:owner/>
+<D:current-user-privilege-set/>
+</D:prop>
+</D:propfind>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/5.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/5.vcf	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/5.vcf	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Thompson;Default;;;
+FN:Default Thompson
+EMAIL;type=INTERNET;type=WORK;type=pref:lthompson at example.com
+TEL;type=WORK;type=pref:1-555-555-5555
+TEL;type=CELL:1-444-444-4444
+item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;USA
+item1.X-ABADR:us
+UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson-5
+END:VCARD

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/6.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/6.vcf	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-only/6.vcf	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Thompson;Default;;;
+FN:Default Thompson
+EMAIL;type=INTERNET;type=WORK;type=pref:lthompson at example.com
+TEL;type=WORK;type=pref:1-555-555-5555
+TEL;type=CELL:1-444-444-4444
+item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;USA
+item1.X-ABADR:us
+UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson-6
+END:VCARD

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/1.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/1.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -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>$cuaddr2:</D:href>
+        <CS:summary>My Shared Address Book</CS:summary>
+        <CS:read-write/>
+    </CS:set>
+</CS:share>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/2.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/2.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='UTF-8'?><notification xmlns='http://calendarserver.org/ns/'>
+  <dtstamp></dtstamp>
+  <invite-notification shared-type='addressbook'>
+    <uid></uid>
+    <href xmlns='DAV:'>$principaluri2:</href>
+    <invite-noresponse/>
+    <access>
+      <read-write/>
+    </access>
+    <hosturl>
+      <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+    </hosturl>
+    <organizer>
+      <href xmlns='DAV:'>$principaluri1:</href>
+      <common-name>User 01</common-name>
+    </organizer>
+    <summary>My Shared Address Book</summary>
+  </invite-notification>
+</notification>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/3.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/3.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/3.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<invite-reply xmlns='http://calendarserver.org/ns/'>
+  <href xmlns='DAV:'>$principaluri2:</href>
+  <invite-accepted/>
+  <hosturl>
+    <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+  </hosturl>
+  <in-reply-to>$inviteuid:</in-reply-to>
+  <summary>The Shared Address Book</summary>
+</invite-reply>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/4.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/4.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/4.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:resourcetype/>
+<D:owner/>
+<D:current-user-privilege-set/>
+</D:prop>
+</D:propfind>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/5.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/5.vcf	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/5.vcf	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Thompson;Default;;;
+FN:Default Thompson
+EMAIL;type=INTERNET;type=WORK;type=pref:lthompson at example.com
+TEL;type=WORK;type=pref:1-555-555-5555
+TEL;type=CELL:1-444-444-4444
+item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;USA
+item1.X-ABADR:us
+UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson-1
+END:VCARD

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/6.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/6.vcf	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/6.vcf	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Thompson;Default;;;
+FN:Default Thompson
+EMAIL;type=INTERNET;type=WORK;type=pref:lthompson at example.com
+TEL;type=WORK;type=pref:1-555-555-5555
+TEL;type=CELL:1-444-444-4444
+item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;USA
+item1.X-ABADR:us
+UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson-1
+END:VCARD

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/7.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/7.vcf	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/7.vcf	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Thompson;Default;;;
+FN:Default Thompson
+EMAIL;type=INTERNET;type=WORK;type=pref:lthompson at example.com
+TEL;type=WORK;type=pref:1-555-555-5555
+TEL;type=CELL:1-444-444-4444
+item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;USA
+item1.X-ABADR:us
+UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson-2
+END:VCARD

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/8.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/8.vcf	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/addressbooks/read-write/8.vcf	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Thompson;Default;;;
+FN:Default Thompson
+EMAIL;type=INTERNET;type=WORK;type=pref:lthompson at example.com
+TEL;type=WORK;type=pref:1-555-555-5555
+TEL;type=CELL:1-444-444-4444
+item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;USA
+item1.X-ABADR:us
+UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson-2
+END:VCARD

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/feature/allowed/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/feature/allowed/1.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/feature/allowed/1.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:" xmlns:S="http://calendarserver.org/ns/">
+<D:prop>
+<S:allowed-sharing-modes/>
+</D:prop>
+</D:propfind>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/feature/downgrade_collection/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/feature/downgrade_collection/1.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/feature/downgrade_collection/1.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav">
+<D:set>
+<D:prop>
+<D:resourcetype><D:collection/><C:addressbook/></D:resourcetype>
+</D:prop>
+</D:set>
+</D:propertyupdate>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/feature/upgrade_collection/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/feature/upgrade_collection/1.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/feature/upgrade_collection/1.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav"  xmlns:S="http://calendarserver.org/ns/">
+<D:set>
+<D:prop>
+<D:resourcetype><D:collection/><C:addressbook/><S:shared-owner/></D:resourcetype>
+</D:prop>
+</D:set>
+</D:propertyupdate>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/nonglobal/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/nonglobal/1.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/nonglobal/1.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:">
+<D:set>
+<D:prop>
+<D:displayname>Changed Name #1</D:displayname>
+</D:prop>
+</D:set>
+</D:propertyupdate>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/nonglobal/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/nonglobal/2.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/nonglobal/2.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:displayname/>
+</D:prop>
+</D:propfind>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/nonglobal/3.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/nonglobal/3.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/nonglobal/3.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:">
+<D:set>
+<D:prop>
+<D:displayname>Shared Name #2</D:displayname>
+</D:prop>
+</D:set>
+</D:propertyupdate>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/shadowable/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/shadowable/1.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/shadowable/1.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav">
+<D:set>
+<D:prop>
+<C:addressbook-description>Description #1</C:addressbook-description>
+</D:prop>
+</D:set>
+</D:propertyupdate>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/shadowable/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/shadowable/2.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/shadowable/2.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav">
+<D:prop>
+<C:addressbook-description/>
+</D:prop>
+</D:propfind>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/shadowable/3.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/shadowable/3.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/peruser-properties/shadowable/3.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav">
+<D:set>
+<D:prop>
+<C:addressbook-description>Sharee Description #2</C:addressbook-description>
+</D:prop>
+</D:set>
+</D:propertyupdate>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/1.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/1.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -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>$cuaddr2:</D:href>
+        <CS:summary>My Shared Address Book</CS:summary>
+        <CS:read-write/>
+    </CS:set>
+</CS:share>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/2.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/2.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='UTF-8'?><notification xmlns='http://calendarserver.org/ns/'>
+  <dtstamp></dtstamp>
+  <invite-notification shared-type='addressbook'>
+    <uid></uid>
+    <href xmlns='DAV:'>$principaluri2:</href>
+    <invite-noresponse/>
+    <access>
+      <read-write/>
+    </access>
+    <hosturl>
+      <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+    </hosturl>
+    <organizer>
+      <href xmlns='DAV:'>$principaluri1:</href>
+      <common-name>User 01</common-name>
+    </organizer>
+    <summary>My Shared Address Book</summary>
+  </invite-notification>
+</notification>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/3.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/3.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/3.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<invite-reply xmlns='http://calendarserver.org/ns/'>
+  <href xmlns='DAV:'>$principaluri2:</href>
+  <invite-accepted/>
+  <hosturl>
+    <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+  </hosturl>
+  <in-reply-to>$inviteuid:</in-reply-to>
+  <summary>The Shared Address Book</summary>
+</invite-reply>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/4.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/4.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/4.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/">
+<D:prop>
+<CS:invite/>
+</D:prop>
+</D:propfind>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/5.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/5.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/5.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?><multistatus xmlns='DAV:'>
+  <response>
+    <href>$addressbookhome1:/shared/</href>
+    <propstat>
+      <prop>
+        <invite xmlns='http://calendarserver.org/ns/'>
+          <user>
+            <uid></uid>
+            <href xmlns='DAV:'>$principaluri2:</href>
+            <common-name>User 02</common-name>
+            <access>
+              <read-write/>
+            </access>
+            <invite-accepted/>
+          </user>
+        </invite>
+      </prop>
+      <status>HTTP/1.1 200 OK</status>
+    </propstat>
+  </response>
+</multistatus>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/6.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/6.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/6.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='UTF-8'?><notification xmlns='http://calendarserver.org/ns/'>
+  <dtstamp></dtstamp>
+  <invite-reply xmlns='http://calendarserver.org/ns/'>
+    <href xmlns='DAV:'>$principaluri2:</href>
+    <invite-accepted/>
+    <hosturl>
+      <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+    </hosturl>
+    <in-reply-to>$inviteuid:</in-reply-to>
+    <summary>The Shared Address Book</summary>
+  </invite-reply>
+</notification>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/7.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/7.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/replies/accept/7.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<shared-as xmlns='http://calendarserver.org/ns/'>
+  <href xmlns='DAV:'></href>
+</shared-as>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/1.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/1.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<invite-reply xmlns='http://calendarserver.org/ns/'>
+  <href xmlns='DAV:'>$principaluri2:</href>
+  <invite-declined/>
+  <hosturl>
+    <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+  </hosturl>
+  <in-reply-to>$inviteuid:</in-reply-to>
+  <summary>The Shared Address Book</summary>
+</invite-reply>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/2.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/2.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/">
+<D:prop>
+<CS:invite/>
+</D:prop>
+</D:propfind>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/3.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/3.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/3.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?><multistatus xmlns='DAV:'>
+  <response>
+    <href>$addressbookhome1:/shared/</href>
+    <propstat>
+      <prop>
+        <invite xmlns='http://calendarserver.org/ns/'>
+          <user>
+            <uid></uid>
+            <href xmlns='DAV:'>$principaluri2:</href>
+            <common-name>User 02</common-name>
+            <access>
+              <read-write/>
+            </access>
+            <invite-declined/>
+          </user>
+        </invite>
+      </prop>
+      <status>HTTP/1.1 200 OK</status>
+    </propstat>
+  </response>
+</multistatus>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/4.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/4.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/replies/decline/4.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?><notification xmlns='http://calendarserver.org/ns/'>
+  <dtstamp></dtstamp>
+  <invite-reply xmlns='http://calendarserver.org/ns/'>
+    <href xmlns='DAV:'>$principaluri2:</href>
+    <invite-declined/>
+    <hosturl>
+      <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+    </hosturl>
+    <in-reply-to>$inviteuid:</in-reply-to>
+  </invite-reply>
+</notification>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/setup/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/setup/1.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/setup/1.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<CS:share xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/">
+    <CS:set>
+        <D:href>$cuaddr2:</D:href>
+        <CS:common-name>Display Name 02</CS:common-name>
+        <CS:summary>My Shared Address Book</CS:summary>
+        <CS:read-write/>
+    </CS:set>
+</CS:share>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/setup/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/setup/2.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/setup/2.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='UTF-8'?><notification xmlns='http://calendarserver.org/ns/'>
+  <dtstamp></dtstamp>
+  <invite-notification shared-type='addressbook'>
+    <uid></uid>
+    <href xmlns='DAV:'>$principaluri2:</href>
+    <invite-noresponse/>
+    <access>
+      <read-write/>
+    </access>
+    <hosturl>
+      <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+    </hosturl>
+    <organizer>
+      <href xmlns='DAV:'>$principaluri1:</href>
+      <common-name>User 01</common-name>
+    </organizer>
+    <summary>My Shared Address Book</summary>
+  </invite-notification>
+</notification>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/setup/3.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/setup/3.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/setup/3.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<invite-reply xmlns='http://calendarserver.org/ns/'>
+  <href xmlns='DAV:'>$principaluri2:</href>
+  <invite-accepted/>
+  <hosturl>
+    <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+  </hosturl>
+  <in-reply-to>$inviteuid:</in-reply-to>
+  <summary>The Shared Address Book</summary>
+</invite-reply>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/setup/4.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/setup/4.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/setup/4.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/">
+<D:prop>
+<CS:invite/>
+</D:prop>
+</D:propfind>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/setup/5.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/setup/5.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/setup/5.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?><multistatus xmlns='DAV:'>
+  <response>
+    <href>$addressbookhome1:/shared/</href>
+    <propstat>
+      <prop>
+        <invite xmlns='http://calendarserver.org/ns/'>
+          <user>
+            <uid></uid>
+            <href xmlns='DAV:'>$principaluri2:</href>
+            <common-name>User 02</common-name>
+            <access>
+              <read-write/>
+            </access>
+            <invite-accepted/>
+          </user>
+        </invite>
+      </prop>
+      <status>HTTP/1.1 200 OK</status>
+    </propstat>
+  </response>
+</multistatus>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/setup/6.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/setup/6.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/setup/6.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='UTF-8'?><notification xmlns='http://calendarserver.org/ns/'>
+  <dtstamp></dtstamp>
+  <invite-reply xmlns='http://calendarserver.org/ns/'>
+    <href xmlns='DAV:'>$principaluri2:</href>
+    <invite-accepted/>
+    <hosturl>
+      <href xmlns='DAV:'>$addressbookhome1:/shared</href>
+    </hosturl>
+    <in-reply-to>$inviteuid:</in-reply-to>
+    <summary>The Shared Address Book</summary>
+  </invite-reply>
+</notification>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/setup/7.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/setup/7.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/setup/7.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<shared-as xmlns='http://calendarserver.org/ns/'>
+  <href xmlns='DAV:'></href>
+</shared-as>

Added: CalDAVTester/trunk/Resource/CardDAV/sharing/unshare/shareedelete/1.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/sharing/unshare/shareedelete/1.vcf	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/sharing/unshare/shareedelete/1.vcf	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Thompson;Default;;;
+FN:Default Thompson
+EMAIL;type=INTERNET;type=WORK;type=pref:lthompson at example.com
+TEL;type=WORK;type=pref:1-555-555-5555
+TEL;type=CELL:1-444-444-4444
+item1.ADR;type=WORK;type=pref:;;1245 Test;Sesame Street;California;11111;USA
+item1.X-ABADR:us
+UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson-15
+END:VCARD

Added: CalDAVTester/trunk/Resource/Common/MKCOL/sharedaddressbook.xml
===================================================================
--- CalDAVTester/trunk/Resource/Common/MKCOL/sharedaddressbook.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/Common/MKCOL/sharedaddressbook.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:mkcol xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav"  xmlns:S="http://calendarserver.org/ns/">
+<D:set>
+<D:prop>
+<D:resourcetype><D:collection/><C:addressbook/><S:shared-owner/></D:resourcetype>
+</D:prop>
+</D:set>
+</D:mkcol>

Modified: CalDAVTester/trunk/scripts/server/serverinfo.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/serverinfo.xml	2010-05-14 19:41:08 UTC (rev 5601)
+++ CalDAVTester/trunk/scripts/server/serverinfo.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -67,6 +67,7 @@
 		<!-- CardDAV specific extension -->
 		<feature>carddav</feature> 						<!-- Basic CardDAV feature enabler -->
 		<feature>global-addressbook</feature> 			<!-- Global address book for each user -->
+		<feature>shared-addressbooks</feature>			<!-- Shared address books extension -->
 
 	</features>
 

Added: CalDAVTester/trunk/scripts/tests/CardDAV/sharing-addressbooks.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CardDAV/sharing-addressbooks.xml	                        (rev 0)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/sharing-addressbooks.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,411 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2010 Apple Inc. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<caldavtest>
+	<description>Test sharing address books</description>
+
+	<require-feature>
+		<feature>carddav</feature>
+		<feature>shared-addressbooks</feature>
+	</require-feature>
+
+	<start>
+		<request user="$userid1:" pswd="$pswd1:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath1:/</ruri>
+		</request>
+		<request user="$userid2:" pswd="$pswd2:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath2:/</ruri>
+		</request>
+		<request end-delete="yes">
+			<method>MKCOL</method>
+			<ruri>$addressbookhome1:/shared/</ruri>
+			<data>
+				<content-type>text/xml; charset=utf-8</content-type>
+				<filepath>Resource/Common/MKCOL/sharedaddressbook.xml</filepath>
+			</data>
+			<verify>
+				<callback>statusCode</callback>
+			</verify>
+		</request>
+	</start>
+	
+	<test-suite name='Read-write addressbooks'>
+		<test name='1' ignore='no'>
+			<description>POST invitation</description>
+			<request print-response='no'>
+				<method>POST</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/read-write/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Check Sharee notification collection</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>WAITCOUNT 1</method>
+				<ruri>$notificationpath2:/</ruri>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GETNEW</method>
+				<ruri>$notificationpath2:/</ruri>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/read-write/2.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}dtstamp</value>
+						<value>{http://calendarserver.org/ns/}uid</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+					<variable>$inviteuid:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Sharee replies ACCEPTED</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>POST</method>
+				<ruri>$addressbookhome2:/</ruri>
+				<data substitutions='yes'>
+					<content-type>application/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/read-write/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<grabelement>
+					<name>{DAV:}href</name>
+					<variable>$sharedaddressbook:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='4'>
+			<description>Shared address book exists</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$sharedaddressbook:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/read-write/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>props</name>
+						<value>DAV:resourcetype$.*shared[^-].*</value>
+						<value><![CDATA[DAV:owner$<href>$principaluri1:</href>]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<read/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<write/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<bind/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<unbind/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*admin.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*all.*]]></value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='5'>
+			<description>Sharee creates vcard</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PUT</method>
+				<ruri>$sharedaddressbook:/1.vcf</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/read-write/5.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='6'>
+			<description>Sharer sees vcard</description>
+			<request print-response='no'>
+				<method>GET</method>
+				<ruri>$addressbookhome1:/shared/1.vcf</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/read-write/5.vcf</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='7'>
+			<description>Sharer changes vcard</description>
+			<request print-response='no'>
+				<method>PUT</method>
+				<ruri>$addressbookhome1:/shared/1.vcf</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/read-write/6.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='8'>
+			<description>Sharee sees changed vcard</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GET</method>
+				<ruri>$sharedaddressbook:/1.vcf</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/read-write/6.vcf</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='9'>
+			<description>Sharer creates vcard</description>
+			<request print-response='no'>
+				<method>PUT</method>
+				<ruri>$addressbookhome1:/shared/2.vcf</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/read-write/7.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='10'>
+			<description>Sharee sees new vcard</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GET</method>
+				<ruri>$sharedaddressbook:/2.vcf</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/read-write/7.vcf</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='11'>
+			<description>Sharee changes vcard</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PUT</method>
+				<ruri>$sharedaddressbook:/2.vcf</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/read-write/8.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='12'>
+			<description>Sharer sees changed event</description>
+			<request print-response='no'>
+				<method>GET</method>
+				<ruri>$addressbookhome1:/shared/2.vcf</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/read-write/8.vcf</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<test-suite name='Change to read-only address book' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>POST invitation</description>
+			<request print-response='no'>
+				<method>POST</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/read-only/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Check Sharee notification collection</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>WAITCOUNT 1</method>
+				<ruri>$notificationpath2:/</ruri>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GETNEW</method>
+				<ruri>$notificationpath2:/</ruri>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/read-only/2.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}dtstamp</value>
+						<value>{http://calendarserver.org/ns/}uid</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+					<variable>$inviteuid:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Sharee replies ACCEPTED</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>POST</method>
+				<ruri>$pathprefix2:/</ruri>
+				<data substitutions='yes'>
+					<content-type>application/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/read-only/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<grabelement>
+					<name>{DAV:}href</name>
+					<variable>$sharedaddressbook:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='4'>
+			<description>Shared address book exists</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$sharedaddressbook:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/read-only/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>props</name>
+						<value>DAV:resourcetype$.*shared[^-].*</value>
+						<value><![CDATA[DAV:owner$<href>$principaluri1:</href>]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<read/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*<write/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*<bind/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*<unbind/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*admin.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*all.*]]></value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='5'>
+			<description>Create vcard</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PUT</method>
+				<ruri>$sharedaddressbook:/3.vcf</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/read-only/5.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>403</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='6'>
+			<description>Sharer creates vcard</description>
+			<request print-response='no'>
+				<method>PUT</method>
+				<ruri>$addressbookhome1:/shared/4.vcf</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/read-only/6.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='7'>
+			<description>Sharee sees new vcard</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GET</method>
+				<ruri>$sharedaddressbook:/4.vcf</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/read-only/6.vcf</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='8'>
+			<description>Sharee canoot change vcard</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PUT</method>
+				<ruri>$sharedaddressbook:/4.vcf</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/read-write/8.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>403</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<end/>
+	
+</caldavtest>

Added: CalDAVTester/trunk/scripts/tests/CardDAV/sharing-feature.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CardDAV/sharing-feature.xml	                        (rev 0)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/sharing-feature.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,243 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2010 Apple Inc. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<caldavtest>
+	<description>Test address book sharing</description>
+
+	<require-feature>
+		<feature>carddav</feature>
+		<feature>shared-addressbooks</feature>
+	</require-feature>
+
+	<start/>
+	
+	<test-suite name='OPTIONS header' ignore='no'>
+		<test name='1'>
+			<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-sharing.*</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Look for options header tag on addressbook</description>
+			<request print-response="no">
+				<method>OPTIONS</method>
+				<ruri>$addressbookpath1:/</ruri>
+				<verify>
+					<callback>header</callback>
+					<arg>
+						<name>header</name>
+						<value>*DAV$.*calendarserver-sharing.*</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<test-suite name='Allowed modes'>
+		<test name='1' ignore='no'>
+			<description>Check mode</description>
+			<request print-response='no'>
+				<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/feature/allowed/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value><![CDATA[http://calendarserver.org/ns/allowed-sharing-modes$<can-be-shared/>]]></value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<test-suite name='Upgrade addressbook to shared'>
+		<test name='1'>
+			<description>Create new addressbook</description>
+			<request end-delete="yes">
+				<method>MKCOL</method>
+				<ruri>$addressbookhome1:/shared1/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/Common/MKCOL/addressbook.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>Not shared</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$addressbookhome1:/shared1/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/Common/PROPFIND/resourcetype.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>props</name>
+						<value>DAV:resourcetype!.*shared-owner.*</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Upgrade via PROPPATCH</description>
+			<request print-response='no'>
+				<method>PROPPATCH</method>
+				<ruri>$addressbookhome1:/shared1/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/feature/upgrade_collection/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:resourcetype</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>Is shared</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$addressbookhome1:/shared1/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/Common/PROPFIND/resourcetype.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>props</name>
+						<value>DAV:resourcetype$.*shared-owner.*</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<test-suite name='Downgrade addressbook from shared'>
+		<test name='1'>
+			<description>Create new shared addressbook</description>
+			<request end-delete="yes">
+				<method>MKCOL</method>
+				<ruri>$addressbookhome1:/shared2/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/Common/MKCOL/sharedaddressbook.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>Is shared</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$addressbookhome1:/shared2/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/Common/PROPFIND/resourcetype.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>props</name>
+						<value>DAV:resourcetype$.*shared-owner.*</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Downgrade via PROPPATCH</description>
+			<request>
+				<method>PROPPATCH</method>
+				<ruri>$addressbookhome1:/shared2/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/feature/downgrade_collection/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>Is not shared</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$addressbookhome1:/shared2/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/Common/PROPFIND/resourcetype.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>props</name>
+						<value>DAV:resourcetype!.*shared-owner.*</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<end/>
+	
+</caldavtest>

Added: CalDAVTester/trunk/scripts/tests/CardDAV/sharing-peruser-properties.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CardDAV/sharing-peruser-properties.xml	                        (rev 0)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/sharing-peruser-properties.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,422 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2010 Apple Inc. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<caldavtest>
+	<description>Test per-user WebDAV properties</description>
+
+	<require-feature>
+		<feature>carddav</feature>
+		<feature>shared-addressbooks</feature>
+	</require-feature>
+
+	<start>
+		<request user="$userid1:" pswd="$pswd1:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath1:/</ruri>
+		</request>
+		<request user="$userid2:" pswd="$pswd2:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath2:/</ruri>
+		</request>
+		<request end-delete="yes">
+			<method>MKCOL</method>
+			<ruri>$addressbookhome1:/shared/</ruri>
+			<data>
+				<content-type>text/xml; charset=utf-8</content-type>
+				<filepath>Resource/Common/MKCOL/sharedaddressbook.xml</filepath>
+			</data>
+			<verify>
+				<callback>statusCode</callback>
+			</verify>
+		</request>
+	</start>
+	
+	<test-suite name='Set up share'>
+		<test name='1' ignore='no'>
+			<description>POST invitation</description>
+			<request print-response='no'>
+				<method>POST</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/setup/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Check Sharee notification collection</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>WAITCOUNT 1</method>
+				<ruri>$notificationpath2:/</ruri>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GETNEW</method>
+				<ruri>$notificationpath2:/</ruri>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/setup/2.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}dtstamp</value>
+						<value>{http://calendarserver.org/ns/}uid</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+					<variable>$inviteuid:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Sharee replies ACCEPTED</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>POST</method>
+				<ruri>$addressbookhome2:/</ruri>
+				<data substitutions='yes'>
+					<content-type>application/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/setup/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/setup/7.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{DAV:}href</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>{DAV:}href</name>
+					<variable>$shareeaddressbook:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>Check accept status</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/setup/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/setup/5.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}uid</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='5'>
+			<description>Check Sharer notification collection</description>
+			<request>
+				<method>WAITCOUNT 1</method>
+				<ruri>$notificationpath1:/</ruri>
+			</request>
+			<request print-response='no'>
+				<method>GETNEW</method>
+				<ruri>$notificationpath1:/</ruri>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/setup/6.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}dtstamp</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<test-suite name='prop patches - non-global' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>PROPPATCH of displayname</description>
+			<request print-response='no'>
+				<method>PROPPATCH</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/peruser-properties/nonglobal/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:displayname</value>
+					</arg>
+				</verify>
+			</request>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/peruser-properties/nonglobal/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:displayname$Changed Name #1</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>PROPFIND of shared displayname</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$shareeaddressbook:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/peruser-properties/nonglobal/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:displayname$The Shared Address Book</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3' ignore='no'>
+			<description>PROPPATCH of displayname</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPPATCH</method>
+				<ruri>$shareeaddressbook:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/peruser-properties/nonglobal/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:displayname</value>
+					</arg>
+				</verify>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$shareeaddressbook:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/peruser-properties/nonglobal/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:displayname$Shared Name #2</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>PROPFIND of shared displayname</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/peruser-properties/nonglobal/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:displayname$Changed Name #1</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<test-suite name='prop patches - shadowable' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>PROPPATCH of addressbook-description</description>
+			<request print-response='no'>
+				<method>PROPPATCH</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/peruser-properties/shadowable/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>urn:ietf:params:xml:ns:carddavaddressbook-description</value>
+					</arg>
+				</verify>
+			</request>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/peruser-properties/shadowable/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>urn:ietf:params:xml:ns:carddavaddressbook-description$Description #1</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>PROPFIND of shared addressbook-description</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$shareeaddressbook:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/peruser-properties/shadowable/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>urn:ietf:params:xml:ns:carddavaddressbook-description$Description #1</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3' ignore='no'>
+			<description>PROPPATCH of addressbook-description</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPPATCH</method>
+				<ruri>$shareeaddressbook:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/peruser-properties/shadowable/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>urn:ietf:params:xml:ns:carddavaddressbook-description</value>
+					</arg>
+				</verify>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$shareeaddressbook:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/peruser-properties/shadowable/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>urn:ietf:params:xml:ns:carddavaddressbook-description$Sharee Description #2</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>PROPFIND of shared addressbook-description</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/peruser-properties/shadowable/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>urn:ietf:params:xml:ns:carddavaddressbook-description$Description #1</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<end>
+		<request user="$userid1:" pswd="$pswd1:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath1:/</ruri>
+		</request>
+		<request user="$userid2:" pswd="$pswd2:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath2:/</ruri>
+		</request>
+	</end>
+	
+</caldavtest>

Added: CalDAVTester/trunk/scripts/tests/CardDAV/sharing-replies.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CardDAV/sharing-replies.xml	                        (rev 0)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/sharing-replies.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,289 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2010 Apple Inc. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<caldavtest>
+	<description>Test addressbook sharing replies</description>
+
+	<require-feature>
+		<feature>carddav</feature>
+		<feature>shared-addressbooks</feature>
+	</require-feature>
+
+	<start>
+		<request user="$userid1:" pswd="$pswd1:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath1:/</ruri>
+		</request>
+		<request user="$userid2:" pswd="$pswd2:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath2:/</ruri>
+		</request>
+		<request end-delete="yes">
+			<method>MKCOL</method>
+			<ruri>$addressbookhome1:/shared/</ruri>
+			<data>
+				<content-type>text/xml; charset=utf-8</content-type>
+				<filepath>Resource/Common/MKCOL/sharedaddressbook.xml</filepath>
+			</data>
+			<verify>
+				<callback>statusCode</callback>
+			</verify>
+		</request>
+	</start>
+	
+	<test-suite name='Send first reply'>
+		<test name='1' ignore='no'>
+			<description>POST invitation</description>
+			<request print-response='no'>
+				<method>POST</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/replies/accept/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Check Sharee notification collection</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>WAITCOUNT 1</method>
+				<ruri>$notificationpath2:/</ruri>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GETNEW</method>
+				<ruri>$notificationpath2:/</ruri>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/replies/accept/2.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}dtstamp</value>
+						<value>{http://calendarserver.org/ns/}uid</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+					<variable>$inviteuid:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Sharee replies ACCEPTED</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>POST</method>
+				<ruri>$addressbookhome2:/</ruri>
+				<data substitutions='yes'>
+					<content-type>application/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/replies/accept/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/replies/accept/7.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{DAV:}href</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>{DAV:}href</name>
+					<variable>$shareeaddressbook:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>Check accept status</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/replies/accept/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/replies/accept/5.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}uid</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='5'>
+			<description>Check Sharer notification collection</description>
+			<request>
+				<method>WAITCOUNT 1</method>
+				<ruri>$notificationpath1:/</ruri>
+			</request>
+			<request print-response='no'>
+				<method>GETNEW</method>
+				<ruri>$notificationpath1:/</ruri>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/replies/accept/6.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}dtstamp</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='6' ignore='no'>
+			<description>Check sharee addressbook displyname</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$shareeaddressbook:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/Common/PROPFIND/displayname.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:displayname$The Shared Address Book</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='7' ignore='no'>
+			<description>Check sharee addressbook displyname</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/Common/PROPFIND/displayname.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>badprops</name>
+						<value>DAV:displayname</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<test-suite name='Update reply'>
+		<test name='1'>
+			<description>Sharee replies DECLINED</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>POST</method>
+				<ruri>$addressbookhome2:/</ruri>
+				<data substitutions='yes'>
+					<content-type>application/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/replies/decline/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>Check declined status</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/replies/decline/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/replies/decline/3.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}uid</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Check Sharer notification collection</description>
+			<request>
+				<method>WAITCOUNT 1</method>
+				<ruri>$notificationpath1:/</ruri>
+			</request>
+			<request print-response='no'>
+				<method>GETNEW</method>
+				<ruri>$notificationpath1:/</ruri>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/replies/decline/4.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}dtstamp</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<end>
+		<request user="$userid1:" pswd="$pswd1:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath1:/</ruri>
+		</request>
+		<request user="$userid2:" pswd="$pswd2:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath2:/</ruri>
+		</request>
+	</end>
+	
+</caldavtest>

Added: CalDAVTester/trunk/scripts/tests/CardDAV/sharing-unshare.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CardDAV/sharing-unshare.xml	                        (rev 0)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/sharing-unshare.xml	2010-05-14 20:16:51 UTC (rev 5602)
@@ -0,0 +1,255 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2010 Apple Inc. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<caldavtest>
+	<description>Test addressbook sharing unshare/delete behavior</description>
+
+	<require-feature>
+		<feature>carddav</feature>
+		<feature>shared-addressbooks</feature>
+	</require-feature>
+
+	<start>
+		<request user="$userid1:" pswd="$pswd1:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath1:/</ruri>
+		</request>
+		<request user="$userid2:" pswd="$pswd2:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath2:/</ruri>
+		</request>
+		<request end-delete="yes">
+			<method>MKCOL</method>
+			<ruri>$addressbookhome1:/shared/</ruri>
+			<data>
+				<content-type>text/xml; charset=utf-8</content-type>
+				<filepath>Resource/Common/MKCOL/sharedaddressbook.xml</filepath>
+			</data>
+			<verify>
+				<callback>statusCode</callback>
+			</verify>
+		</request>
+	</start>
+	
+	<test-suite name='Set up share'>
+		<test name='1' ignore='no'>
+			<description>POST invitation</description>
+			<request print-response='no'>
+				<method>POST</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/setup/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Check Sharee notification collection</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>WAITCOUNT 1</method>
+				<ruri>$notificationpath2:/</ruri>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GETNEW</method>
+				<ruri>$notificationpath2:/</ruri>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/setup/2.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}dtstamp</value>
+						<value>{http://calendarserver.org/ns/}uid</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+					<variable>$inviteuid:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Sharee replies ACCEPTED</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>POST</method>
+				<ruri>$addressbookhome2:/</ruri>
+				<data substitutions='yes'>
+					<content-type>application/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/setup/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/setup/7.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{DAV:}href</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>{DAV:}href</name>
+					<variable>$shareeaddressbook:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>Check accept status</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/setup/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/setup/5.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}uid</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='5'>
+			<description>Check Sharer notification collection</description>
+			<request>
+				<method>WAITCOUNT 1</method>
+				<ruri>$notificationpath1:/</ruri>
+			</request>
+			<request print-response='no'>
+				<method>GETNEW</method>
+				<ruri>$notificationpath1:/</ruri>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/setup/6.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}dtstamp</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<test-suite name='Delete'>
+		<test name='1'>
+			<description>Sharer adds event</description>
+			<request print-response='no'>
+				<method>PUT</method>
+				<ruri>$addressbookhome1:/shared/1.vcf</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/unshare/shareedelete/1.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>Sharee deletes shared addressbook</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>DELETE</method>
+				<ruri>$shareeaddressbook:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>infinity</value>
+				</header>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='3' ignore='no'>
+			<description>No more shared addressbook</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$shareeaddressbook:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/Common/PROPFIND/resourcetype.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>404</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>Sharer still has addressbook data</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$addressbookhome1:/shared/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>1</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/Common/PROPFIND/count.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>count</name>
+						<value>1</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<end>
+		<request user="$userid1:" pswd="$pswd1:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath1:/</ruri>
+		</request>
+		<request user="$userid2:" pswd="$pswd2:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath2:/</ruri>
+		</request>
+	</end>
+	
+</caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100514/909553df/attachment-0001.html>


More information about the calendarserver-changes mailing list