[CalendarServer-changes] [6708] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Wed Dec 22 18:44:59 PST 2010


Revision: 6708
          http://trac.macosforge.org/projects/calendarserver/changeset/6708
Author:   cdaboo at apple.com
Date:     2010-12-22 18:44:55 -0800 (Wed, 22 Dec 2010)
Log Message:
-----------
Test that removal of sharee does not cause problems.

Modified Paths:
--------------
    CalDAVTester/trunk/scripts/tests/CalDAV/sharing-notification-sync.xml
    CalDAVTester/trunk/scripts/tests/CardDAV/put.xml
    CalDAVTester/trunk/verifiers/multistatusItems.py

Added Paths:
-----------
    CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/11.xml
    CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/12.xml
    CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/13.xml

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/11.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/11.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/11.xml	2010-12-23 02:44:55 UTC (rev 6708)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<CS:share xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/">
+    <CS:remove>
+        <D:href>$cuaddr2:</D:href>
+        <CS:summary>My Shared Calendar</CS:summary>
+        <CS:read-write/>
+    </CS:remove>
+</CS:share>

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/12.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/12.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/12.xml	2010-12-23 02:44:55 UTC (rev 6708)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:" xmlns:A="http://calendarserver.org/ns/">
+<D:prop>
+<A:getctag/>
+</D:prop>
+</D:propfind>

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/13.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/13.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/13.xml	2010-12-23 02:44:55 UTC (rev 6708)
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='UTF-8'?><notification xmlns='http://calendarserver.org/ns/'>
+  <dtstamp></dtstamp>
+  <invite-notification shared-type='calendar'>
+    <uid></uid>
+    <href xmlns='DAV:'>$cuaddr2:</href>
+    <invite-declined/>
+    <access>
+      <read-write/>
+    </access>
+    <hosturl>
+      <href xmlns='DAV:'>$pathprefix1:/shared</href>
+    </hosturl>
+    <organizer>
+      <href xmlns='DAV:'>$principaluri1:</href>
+      <common-name>User 01</common-name>
+    </organizer>
+    <summary>My Shared Calendar</summary>
+  </invite-notification>
+</notification>

Modified: CalDAVTester/trunk/scripts/tests/CalDAV/sharing-notification-sync.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/sharing-notification-sync.xml	2010-12-21 20:25:25 UTC (rev 6707)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/sharing-notification-sync.xml	2010-12-23 02:44:55 UTC (rev 6708)
@@ -297,7 +297,7 @@
 		</test>
 	</test-suite>
 
-	<test-suite name='Read-write calendar - depth infinity'>
+	<test-suite name='Read-write calendar - depth infinity - sharee delete'>
 		<test name='1' ignore='no'>
 			<description>POST invitation</description>
 			<request print-response='no'>
@@ -493,6 +493,273 @@
 		</test>
 	</test-suite>
 
+	<test-suite name='Read-write calendar - depth infinity - sharer removes'>
+		<test name='1' ignore='no'>
+			<description>POST invitation</description>
+			<request print-response='no'>
+				<method>POST</method>
+				<ruri>$pathprefix1:/shared/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>new resource</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/CalDAV/sharing/notification-sync/13.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>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>REPORT</method>
+				<ruri>$pathprefix2:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>infinity</value>
+				</header>
+				<data substitutions='yes'>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>totalcount</name>
+						<value>1</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>/{DAV:}multistatus/{DAV:}sync-token</name>
+					<variable>$synctoken2:</variable>
+				</grabelement>
+				<grabelement>
+					<name>/{DAV:}multistatus/{DAV:}response/{DAV:}href</name>
+					<variable>$href2:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Remove notification</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>DELETEALL</method>
+				<ruri>$notificationpath2:/</ruri>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>deleted resource</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>REPORT</method>
+				<ruri>$pathprefix2:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>infinity</value>
+				</header>
+				<data substitutions='yes'>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>prefix</name>
+						<value/>
+					</arg>
+					<arg>
+						<name>badhrefs</name>
+						<value>$href2:</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>/{DAV:}multistatus/{DAV:}sync-token</name>
+					<variable>$synctoken2:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='5'>
+			<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/CalDAV/sharing/notification-sync/5.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<grabelement>
+					<name>{DAV:}href</name>
+					<variable>$sharedcalendar:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='6' ignore='no'>
+			<description>new calendar</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>REPORT</method>
+				<ruri>$pathprefix2:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>infinity</value>
+				</header>
+				<data substitutions='yes'>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>prefix</name>
+						<value/>
+					</arg>
+					<arg>
+						<name>okhrefs</name>
+						<value>$sharedcalendar:/</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>/{DAV:}multistatus/{DAV:}sync-token</name>
+					<variable>$synctoken2:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='7' ignore='no'>
+			<description>POST invitation</description>
+			<request print-response='no'>
+				<method>POST</method>
+				<ruri>$pathprefix1:/shared/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/11.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+			<request print-response='no'>
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>infinity</value>
+				</header>
+				<data substitutions='yes'>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<grabelement>
+					<name>/{DAV:}multistatus/{DAV:}sync-token</name>
+					<variable>$synctoken1:</variable>
+				</grabelement>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>DELETEALL</method>
+				<ruri>$notificationpath2:/</ruri>
+			</request>
+		</test>
+		<test name='8' ignore='no'>
+			<description>removed calendar</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>REPORT</method>
+				<ruri>$pathprefix2:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>infinity</value>
+				</header>
+				<data substitutions='yes'>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>prefix</name>
+						<value/>
+					</arg>
+					<arg>
+						<name>ignoremissing</name>
+						<value/>
+					</arg>
+					<arg>
+						<name>badhrefs</name>
+						<value>$sharedcalendar:/</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>/{DAV:}multistatus/{DAV:}sync-token</name>
+					<variable>$synctoken2:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='9' ignore='no'>
+			<description>no calendar change</description>
+			<request print-response='no'>
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>infinity</value>
+				</header>
+				<data substitutions='yes'>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/9.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>totalcount</name>
+						<value>0</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='10' ignore='no'>
+			<description>no calendar change</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$pathprefix1:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>1</value>
+				</header>
+				<data substitutions='yes'>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/12.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
 	<test-suite name='Shared calendar data - depth infinity'>
 		<test name='1'>
 			<description>Sharer creates event</description>
@@ -543,6 +810,25 @@
 				<method>DELETEALL</method>
 				<ruri>$notificationpath2:/</ruri>
 			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>REPORT</method>
+				<ruri>$pathprefix2:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>infinity</value>
+				</header>
+				<data substitutions='yes'>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<grabelement>
+					<name>/{DAV:}multistatus/{DAV:}sync-token</name>
+					<variable>$synctoken2:</variable>
+				</grabelement>
+			</request>
 		</test>
 		<test name='5'>
 			<description>Sharee replies ACCEPTED</description>
@@ -586,10 +872,6 @@
 						<value>$sharedcalendar:/</value>
 						<value>$sharedcalendar:/1.ics</value>
 					</arg>
-					<arg>
-						<name>badhrefs</name>
-						<value>$href2:</value>
-					</arg>
 				</verify>
 				<grabelement>
 					<name>/{DAV:}multistatus/{DAV:}sync-token</name>

Modified: CalDAVTester/trunk/scripts/tests/CardDAV/put.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CardDAV/put.xml	2010-12-21 20:25:25 UTC (rev 6707)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/put.xml	2010-12-23 02:44:55 UTC (rev 6708)
@@ -350,6 +350,41 @@
 		</test>
 	</test-suite>
 
+	<test-suite name='Test \ escapes'>
+		<test name='1' ignore='no'>
+			<description>PUT simple person contact</description>
+			<request end-delete='yes' print-response='yes'>
+				<method>PUT</method>
+				<ruri>$addressbookpath1:/1.vcf</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/vcardput/1.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>header</callback>
+					<arg>
+						<name>header</name>
+						<value>ETag</value>
+					</arg>
+				</verify>
+			</request>
+			<request>
+				<method>GET</method>
+				<ruri>$addressbookpath1:/1.vcf</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CardDAV/vcardput/1.vcf</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
 	<end/>
 
 </caldavtest>

Modified: CalDAVTester/trunk/verifiers/multistatusItems.py
===================================================================
--- CalDAVTester/trunk/verifiers/multistatusItems.py	2010-12-21 20:25:25 UTC (rev 6707)
+++ CalDAVTester/trunk/verifiers/multistatusItems.py	2010-12-23 02:44:55 UTC (rev 6708)
@@ -139,7 +139,7 @@
             ok_extras = ok_result_set.difference( ok_test_set ) if not ignoremissing else set()
             no_extras = ok_result_set.intersection( no_test_set )
             bad_missing = bad_test_set.difference( bad_result_set )
-            bad_extras = bad_result_set.difference( bad_test_set )
+            bad_extras = bad_result_set.difference( bad_test_set ) if not ignoremissing else set()
             
             if len( ok_missing ) + len( ok_extras ) + len( no_extras ) + len( bad_missing ) + len( bad_extras )!= 0:
                 if len( ok_missing ) != 0:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20101222/8a1dff35/attachment-0001.html>


More information about the calendarserver-changes mailing list