[CalendarServer-changes] [10012] CalDAVTester/branches/users/gaya/sharedgroupstester

source_changes at macosforge.org source_changes at macosforge.org
Thu Nov 8 18:03:56 PST 2012


Revision: 10012
          http://trac.calendarserver.org//changeset/10012
Author:   gaya at apple.com
Date:     2012-11-08 18:03:56 -0800 (Thu, 08 Nov 2012)
Log Message:
-----------
add shared addressbook tests

Modified Paths:
--------------
    CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-addressbooks.xml

Added Paths:
-----------
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/1.vcf
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/10.vcf
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/11.vcf
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/12.vcf
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/13.vcf
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/14.vcf
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/15.vcf
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/16.xml
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/2.vcf
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/3.vcf
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/4.xml
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/5.xml
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/6.xml
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/7.xml
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/8.vcf
    CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/9.vcf

Added: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/1.vcf
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/1.vcf	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/1.vcf	2012-11-09 02:03:56 UTC (rev 10012)
@@ -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-555-555-5555
+item1.ADR;type=WORK;type=pref:;;2 Lag;Elk Forest;California;99999;USA
+item1.X-ABADR:us
+UID:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
+END:VCARD

Added: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/10.vcf
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/10.vcf	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/10.vcf	2012-11-09 02:03:56 UTC (rev 10012)
@@ -0,0 +1,8 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:ef5516c6-0efd-4626-98b4-5cd2868f3971
+FN:Empty Group
+N:Empty Group;;;;
+X-ADDRESSBOOKSERVER-KIND:group
+END:VCARD

Added: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/11.vcf
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/11.vcf	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/11.vcf	2012-11-09 02:03:56 UTC (rev 10012)
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:760d9b28-5a13-4880-b7eb-5769e6688fa3
+FN:Top Group
+N:Top Group;;;;
+REV:20120503T194243Z
+X-ADDRESSBOOKSERVER-KIND:group
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:8aa9ed15-5619-44d7-b061-51976dd5a174
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:ef5516c6-0efd-4626-98b4-5cd2868f3971
+END:VCARD

Added: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/12.vcf
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/12.vcf	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/12.vcf	2012-11-09 02:03:56 UTC (rev 10012)
@@ -0,0 +1,9 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:ef5516c6-0efd-4626-98b4-5cd2868f3971
+FN:New Group
+N:New Group;;;;
+X-ADDRESSBOOKSERVER-KIND:group
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson-2
+END:VCARD

Added: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/13.vcf
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/13.vcf	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/13.vcf	2012-11-09 02:03:56 UTC (rev 10012)
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:8aa9ed15-5619-44d7-b061-51976dd5a174
+FN:Sub Group
+N:Sub Group;;;;
+REV:20120503T194243Z
+X-ADDRESSBOOKSERVER-KIND:group
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:FCBA0FA3-00B2-4C95-B4EC-4CCC4843F8B1:ABPerson
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson
+END:VCARD

Added: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/14.vcf
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/14.vcf	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/14.vcf	2012-11-09 02:03:56 UTC (rev 10012)
@@ -0,0 +1,10 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:8aa9ed15-5619-44d7-b061-51976dd5a174
+FN:Sub Group
+N:Sub Group;;;;
+REV:20120503T194243Z
+X-ADDRESSBOOKSERVER-KIND:group
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:FCBA0FA3-00B2-4C95-B4EC-4CCC4843F8B1:ABPerson
+END:VCARD

Added: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/15.vcf
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/15.vcf	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/15.vcf	2012-11-09 02:03:56 UTC (rev 10012)
@@ -0,0 +1,9 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:8aa9ed15-5619-44d7-b061-51976dd5a174
+FN:Sub Group
+N:Sub Group;;;;
+REV:20120503T194243Z
+X-ADDRESSBOOKSERVER-KIND:group
+END:VCARD

Added: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/16.xml
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/16.xml	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/16.xml	2012-11-09 02:03:56 UTC (rev 10012)
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='UTF-8'?><notification xmlns='http://calendarserver.org/ns/'>
+  <dtstamp></dtstamp>
+  <invite-notification shared-type='group'>
+    <uid></uid>
+    <href xmlns='DAV:'>$cuaddrurn2:</href>
+    <invite-deleted/>
+    <access>
+      <read-write/>
+    </access>
+    <hosturl>
+      <href xmlns='DAV:'>$addressbookpath1:/3.vcf</href>
+    </hosturl>
+    <organizer>
+      <href xmlns='DAV:'>$principaluri1:</href>
+      <common-name>User 01</common-name>
+    </organizer>
+    <summary>Group Address Book</summary>
+  </invite-notification>
+</notification>

Added: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/2.vcf
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/2.vcf	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/2.vcf	2012-11-09 02:03:56 UTC (rev 10012)
@@ -0,0 +1,12 @@
+BEGIN:VCARD
+VERSION:3.0
+N:Kawado;Saeko;;;
+FN:Snow Leopard
+ORG:Snow Leopard;
+EMAIL;type=INTERNET;type=WORK;type=pref:snowleopard_apple at example.com
+TEL;type=WORK;type=pref:555-555-5555
+item1.ADR;type=WORK;type=pref:;;2 Fidel Ave. Suite 1;Mountain Top;CA;99999;USA
+item1.X-ABADR:us
+X-ABShowAs:COMPANY
+UID:FCBA0FA3-00B2-4C95-B4EC-4CCC4843F8B1:ABPerson
+END:VCARD

Added: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/3.vcf
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/3.vcf	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/3.vcf	2012-11-09 02:03:56 UTC (rev 10012)
@@ -0,0 +1,10 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:760d9b28-5a13-4880-b7eb-5769e6688fa3
+FN:Top Group
+N:Top Group;;;;
+REV:20120503T194243Z
+X-ADDRESSBOOKSERVER-KIND:group
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:8aa9ed15-5619-44d7-b061-51976dd5a174
+END:VCARD

Added: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/4.xml
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/4.xml	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/4.xml	2012-11-09 02:03:56 UTC (rev 10012)
@@ -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>Group Address Book</CS:summary>
+        <CS:read-write/>
+    </CS:set>
+</CS:share>
\ No newline at end of file

Added: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/5.xml
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/5.xml	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/5.xml	2012-11-09 02:03:56 UTC (rev 10012)
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='UTF-8'?><notification xmlns='http://calendarserver.org/ns/'>
+  <dtstamp></dtstamp>
+  <invite-notification shared-type='group'>
+    <uid></uid>
+    <href xmlns='DAV:'>$cuaddrurn2:</href>
+    <invite-noresponse/>
+    <access>
+      <read-write/>
+    </access>
+    <hosturl>
+      <href xmlns='DAV:'>$addressbookpath1:/3.vcf</href>
+    </hosturl>
+    <organizer>
+      <href xmlns='DAV:'>$principaluri1:</href>
+      <common-name>User 01</common-name>
+    </organizer>
+    <summary>Group Address Book</summary>
+  </invite-notification>
+</notification>

Added: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/6.xml
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/6.xml	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/6.xml	2012-11-09 02:03:56 UTC (rev 10012)
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<invite-reply xmlns='http://calendarserver.org/ns/'>
+  <href xmlns='DAV:'>mailto:$email2:</href>
+  <invite-accepted/>
+  <hosturl>
+    <href xmlns='DAV:'>$addressbookpath1:/3.vcf</href>
+  </hosturl>
+  <in-reply-to>$inviteuid:</in-reply-to>
+  <summary>Group Address Book</summary>
+  <common-name>$username2:</common-name>
+  <first-name>$firstname2:</first-name>
+  <last-name>$lastname2:</last-name>
+</invite-reply>

Added: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/7.xml
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/7.xml	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/7.xml	2012-11-09 02:03:56 UTC (rev 10012)
@@ -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/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/8.vcf
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/8.vcf	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/8.vcf	2012-11-09 02:03:56 UTC (rev 10012)
@@ -0,0 +1,9 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:ef5516c6-0efd-4626-98b4-5cd2868f3971
+FN:Empty Group
+N:Empty Group;;;;
+X-ADDRESSBOOKSERVER-KIND:group
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:ED7A5AEC-AB19-4CE0-AD6A-2923A3E5C4E1:ABPerson-2
+END:VCARD

Added: CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/9.vcf
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/9.vcf	                        (rev 0)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/Resource/CardDAV/sharing/addressbooks/group/9.vcf	2012-11-09 02:03:56 UTC (rev 10012)
@@ -0,0 +1,9 @@
+BEGIN:VCARD
+VERSION:3.0
+PRODID:-//Apple Inc.//AddressBook 6.1//EN
+UID:ef5516c6-0efd-4626-98b4-5cd2868f3971
+FN:Empty Group
+N:Empty Group;;;;
+X-ADDRESSBOOKSERVER-KIND:group
+X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:760d9b28-5a13-4880-b7eb-5769e6688fa3
+END:VCARD

Modified: CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-addressbooks.xml
===================================================================
--- CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-addressbooks.xml	2012-11-09 01:54:04 UTC (rev 10011)
+++ CalDAVTester/branches/users/gaya/sharedgroupstester/scripts/tests/CardDAV/sharing-addressbooks.xml	2012-11-09 02:03:56 UTC (rev 10012)
@@ -48,7 +48,7 @@
 		</request>
 	</start>
 	
-	<test-suite name='Read-write addressbooks'>
+	<test-suite name='Read-write addressbooks' ignore='no'>
 		<test name='1' ignore='no'>
 			<description>POST invitation</description>
 			<request print-response='no'>
@@ -762,7 +762,7 @@
 			<description>No more shared addressbook</description>
 			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
 				<method>PROPFIND</method>
-				<ruri>$shareeaddressbook:/</ruri>
+				<ruri>$sharedaddressbook:/</ruri>
 				<header>
 					<name>Depth</name>
 					<value>0</value>
@@ -789,6 +789,470 @@
 		</test>
 	</test-suite>
 
+	<test-suite name='Share group' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>Sharee create 2 persons and a group</description>
+			<request print-response='no'>
+				<method>PUT</method>
+				<ruri>$addressbookpath1:/1.vcf</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/group/1.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+			<request print-response='no'>
+				<method>PUT</method>
+				<ruri>$addressbookpath1:/2.vcf</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/group/2.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+			<request print-response='no'>
+				<method>PUT</method>
+				<ruri>$addressbookpath1:/3.vcf</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/group/3.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>POST invitation to user vCard</description>
+			<request print-response='no'>
+				<method>POST</method>
+				<ruri>$addressbookpath1:/1.vcf</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/group/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>403</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3' ignore='no'>
+			<description>POST invitation to group vCard</description>
+			<request print-response='no'>
+				<method>POST</method>
+				<ruri>$addressbookpath1:/3.vcf</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/group/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+					<value>200</value>
+				</verify>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>Check Sharee notification collection</description>
+			<request user="$userid2:" pswd="$pswd2:" print-request='no' print-response='no'>
+				<method>WAITCOUNT 1</method>
+				<ruri>$notificationpath2:/</ruri>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-request='no' print-response='no'>
+				<method>GETNEW</method>
+				<ruri>$notificationpath2:/</ruri>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/group/5.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='5' ignore='no'>
+			<description>Sharee replies ACCEPTED</description>
+			<request user="$userid2:" pswd="$pswd2:" print-request='no' 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/group/6.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<grabelement>
+					<name>{DAV:}href</name>
+					<variable>$sharedaddressbook:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='6' ignore='no'>
+			<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/group/7.xml</filepath>
+				</data>
+				<verify>
+					<callback>xmlElementMatch</callback>
+					<arg>
+						<name>exists</name>
+						<value>$verify-property-prefix:/{DAV:}owner/{DAV:}href[=$principaluri1:]</value>
+						<value>$verify-property-prefix:/{DAV:}resourcetype/{http://calendarserver.org/ns/}shared</value>
+						<value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}read</value>
+						<value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}write</value>
+						<value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}bind</value>
+						<value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}unbind</value>
+					</arg>
+					<arg>
+						<name>notexists</name>
+						<value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}admin</value>
+						<value>$verify-property-prefix:/{DAV:}current-user-privilege-set/{DAV:}privilege/{DAV:}all</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='7' ignore='no'>
+			<description>Sharee creates group vcard with unknown member UID</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/group/8.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>403</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='8' ignore='no'>
+			<description>Sharee creates group vcard with member UID in ab but not in group</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/group/9.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>403</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='9' ignore='no'>
+			<description>Sharee creates 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/group/10.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='10' ignore='no'>
+			<description>Sharer sees vcard as group member</description>
+			<request print-response='no'>
+				<method>GET</method>
+				<ruri>$addressbookpath1:/4.vcf</ruri>
+				<verify>
+					<callback>addressDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/group/10.vcf</value>
+					</arg>
+				</verify>
+			</request>
+			<request print-response='no'>
+				<method>GET</method>
+				<ruri>$addressbookpath1:/3.vcf</ruri>
+				<verify>
+					<callback>addressDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/group/11.vcf</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='11' ignore='no'>
+			<description>Sharer changes vcard</description>
+			<request print-response='no'>
+				<method>PUT</method>
+				<ruri>$addressbookpath1:/4.vcf</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/group/12.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='12' ignore='no'>
+			<description>Sharee sees changed vcard</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GET</method>
+				<ruri>$sharedaddressbook:/4.vcf</ruri>
+				<verify>
+					<callback>addressDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/group/12.vcf</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='13' ignore='no'>
+			<description>Sharer creates subgroup that contains 2 already present members</description>
+			<request print-response='no'>
+				<method>PUT</method>
+				<ruri>$addressbookpath1:/5.vcf</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/group/13.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='14' ignore='no'>
+			<description>Sharee sees new vcards</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GET</method>
+				<ruri>$sharedaddressbook:/5.vcf</ruri>
+				<verify>
+					<callback>addressDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/group/13.vcf</value>
+					</arg>
+				</verify>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GET</method>
+				<ruri>$sharedaddressbook:/2.vcf</ruri>
+				<verify>
+					<callback>addressDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/group/2.vcf</value>
+					</arg>
+				</verify>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GET</method>
+				<ruri>$sharedaddressbook:/1.vcf</ruri>
+				<verify>
+					<callback>addressDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/group/1.vcf</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='15' ignore='no'>
+			<description>Sharee removes vCard from subgroup</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PUT</method>
+				<ruri>$sharedaddressbook:/5.vcf</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/sharing/addressbooks/group/14.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='16' ignore='no'>
+			<description>Sharee cannot access removed sub group member</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GET</method>
+				<ruri>$sharedaddressbook:/1.vcf</ruri>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>404</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='17' ignore='no'>
+			<description>Sharer sees subgroup changes and removed subgroup member</description>
+			<request print-response='no'>
+				<method>GET</method>
+				<ruri>$addressbookpath1:/5.vcf</ruri>
+				<verify>
+					<callback>addressDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/group/14.vcf</value>
+					</arg>
+				</verify>
+			</request>
+			<request print-response='no'>
+				<method>GET</method>
+				<ruri>$addressbookpath1:/1.vcf</ruri>
+				<verify>
+					<callback>addressDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/group/1.vcf</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='18' ignore='no'>
+			<description>Sharee deletes vCard in subgroup</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>DELETE</method>
+				<ruri>$sharedaddressbook:/2.vcf</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='19' ignore='no'>
+			<description>Sharer sees subgroup changes and sharee-deleted subgroup member</description>
+			<request print-response='no'>
+				<method>GET</method>
+				<ruri>$addressbookpath1:/5.vcf</ruri>
+				<verify>
+					<callback>addressDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/group/15.vcf</value>
+					</arg>
+				</verify>
+			</request>
+			<request print-response='no'>
+				<method>GET</method>
+				<ruri>$addressbookpath1:/2.vcf</ruri>
+				<verify>
+					<callback>addressDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/sharing/addressbooks/group/2.vcf</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='20' ignore='no'>
+			<description>Delete shared group</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>DELETE</method>
+				<ruri>$</ruri>
+			</request>
+			<request print-response='no'>
+				<method>DELETE</method>
+				<ruri>$addressbookpath1:/3.vcf</ruri>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>204</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='21' ignore='no'>
+			<description>Check Sharee notification collection and delete invite-deleted</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/group/16.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}dtstamp</value>
+						<value>{http://calendarserver.org/ns/}uid</value>
+					</arg>
+				</verify>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>DELETE</method>
+				<ruri>$</ruri>
+			</request>
+		</test>
+		<test name='22' ignore='no'>
+			<description>No more shared addressbook</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/Common/PROPFIND/resourcetype.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>404</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='23' ignore='no'>
+			<description>Clean up main addressbook</description>
+			<request>
+				<method>DELETEALL</method>
+				<ruri>$addressbookpath1:/</ruri>
+			</request>
+		</test>
+	</test-suite>
+
 	<end>
 		<request user="$useradmin:" pswd="$pswdadmin:">
 			<method>DELETEALL</method>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20121108/8167f586/attachment-0001.html>


More information about the calendarserver-changes mailing list