[CalendarServer-changes] [9824] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 19 18:52:28 PDT 2012


Revision: 9824
          http://trac.calendarserver.org//changeset/9824
Author:   cdaboo at apple.com
Date:     2012-09-19 18:52:27 -0700 (Wed, 19 Sep 2012)
Log Message:
-----------
Make sure current sharee display name is in sharee's notification of unshare.

Modified Paths:
--------------
    CalDAVTester/trunk/scripts/tests/CalDAV/sharing-unshare.xml

Added Paths:
-----------
    CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/
    CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/1.xml
    CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/2.xml
    CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/3.xml
    CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/4.xml
    CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/5.xml
    CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/6.xml
    CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/7.xml

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/1.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/1.xml	2012-09-20 01:52:27 UTC (rev 9824)
@@ -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>$cuaddr3:</D:href>
+        <CS:common-name>Display Name 03</CS:common-name>
+        <CS:summary>My Shared Calendar</CS:summary>
+        <CS:read-write/>
+    </CS:set>
+</CS:share>

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/2.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/2.xml	2012-09-20 01:52:27 UTC (rev 9824)
@@ -0,0 +1,22 @@
+<?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:'>$cuaddr3:</href>
+    <invite-noresponse/>
+    <access>
+      <read-write/>
+    </access>
+    <hosturl>
+      <href xmlns='DAV:'>$calendarhome1:/shared</href>
+    </hosturl>
+    <organizer>
+      <href xmlns='DAV:'>$principaluri1:</href>
+      <common-name>User 01</common-name>
+    </organizer>
+    <summary>My Shared Calendar</summary>
+    <supported-calendar-component-set xmlns='urn:ietf:params:xml:ns:caldav'>
+      <comp name="VEVENT" />
+    </supported-calendar-component-set>
+  </invite-notification>
+</notification>

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/3.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/3.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/3.xml	2012-09-20 01:52:27 UTC (rev 9824)
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<invite-reply xmlns='http://calendarserver.org/ns/'>
+  <href xmlns='DAV:'>mailto:$email3:</href>
+  <invite-accepted/>
+  <hosturl>
+    <href xmlns='DAV:'>$calendarhome1:/shared</href>
+  </hosturl>
+  <in-reply-to>$inviteuid:</in-reply-to>
+  <summary>The Shared Calendar</summary>
+  <common-name>$username3:</common-name>
+  <first-name>$firstname3:</first-name>
+  <last-name>$lastname3:</last-name>
+</invite-reply>

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/4.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/4.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/4.xml	2012-09-20 01:52:27 UTC (rev 9824)
@@ -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/CalDAV/sharing/unshare/shareruninvite/5.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/5.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/5.xml	2012-09-20 01:52:27 UTC (rev 9824)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:">
+<D:set>
+<D:prop>
+<D:displayname>Sharee Display Name</D:displayname>
+</D:prop>
+</D:set>
+</D:propertyupdate>

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/6.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/6.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/6.xml	2012-09-20 01:52:27 UTC (rev 9824)
@@ -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>$cuaddr3:</D:href>
+        <CS:summary>My Shared Calendar</CS:summary>
+        <CS:read-write/>
+    </CS:remove>
+</CS:share>

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/7.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/7.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/unshare/shareruninvite/7.xml	2012-09-20 01:52:27 UTC (rev 9824)
@@ -0,0 +1,22 @@
+<?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:'>$cuaddr3:</href>
+    <invite-deleted/>
+    <access>
+      <read-write/>
+    </access>
+    <hosturl>
+      <href xmlns='DAV:'>$calendarhome1:/shared</href>
+    </hosturl>
+    <organizer>
+      <href xmlns='DAV:'>$principaluri1:</href>
+      <common-name>User 01</common-name>
+    </organizer>
+    <summary>Sharee Display Name</summary>
+    <supported-calendar-component-set xmlns='urn:ietf:params:xml:ns:caldav'>
+      <comp name="VEVENT" />
+    </supported-calendar-component-set>
+  </invite-notification>
+</notification>

Modified: CalDAVTester/trunk/scripts/tests/CalDAV/sharing-unshare.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/sharing-unshare.xml	2012-09-20 01:39:01 UTC (rev 9823)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/sharing-unshare.xml	2012-09-20 01:52:27 UTC (rev 9824)
@@ -44,7 +44,7 @@
 		</request>
 	</start>
 	
-	<test-suite name='Set up share'>
+	<test-suite name='Set up share' ignore="no">
 		<test name='1' ignore='no'>
 			<description>POST invitation</description>
 			<request print-response='no'>
@@ -162,7 +162,7 @@
 		</test>
 	</test-suite>
 	
-	<test-suite name='Delete'>
+	<test-suite name='Delete' ignore="no">
 		<test name='1'>
 			<description>Sharer adds event</description>
 			<request print-response='no'>
@@ -237,6 +237,135 @@
 		</test>
 	</test-suite>
 
+	<test-suite name='Invite, display name change, uninvite' ignore="no">
+		<test name='1' ignore='no'>
+			<description>POST invitation</description>
+			<request print-response='no'>
+				<method>POST</method>
+				<ruri>$calendarhome1:/shared/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/unshare/shareruninvite/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Check Sharee notification collection</description>
+			<request user="$userid3:" pswd="$pswd3:" print-response='no'>
+				<method>WAITCOUNT 1</method>
+				<ruri>$notificationpath3:/</ruri>
+			</request>
+			<request user="$userid3:" pswd="$pswd3:" print-response='no'>
+				<method>GETNEW</method>
+				<ruri>$notificationpath3:/</ruri>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/unshare/shareruninvite/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="$userid3:" pswd="$pswd3:" print-response='no'>
+				<method>POST</method>
+				<ruri>$calendarhome3:/</ruri>
+				<data substitutions='yes'>
+					<content-type>application/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/unshare/shareruninvite/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/unshare/shareruninvite/4.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{DAV:}href</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>{DAV:}href</name>
+					<variable>$shareecalendar:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='4'>
+			<description>Sharee changes name</description>
+			<request user="$userid3:" pswd="$pswd3:" print-response='no'>
+				<method>PROPPATCH</method>
+				<ruri>$shareecalendar:/</ruri>
+				<data>
+					<content-type>application/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/unshare/shareruninvite/5.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>{DAV:}displayname</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='5' ignore='no'>
+			<description>POST uninvitation</description>
+			<request print-response='no'>
+				<method>POST</method>
+				<ruri>$calendarhome1:/shared/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/unshare/shareruninvite/6.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='6'>
+			<description>Check Sharee notification collection</description>
+			<request user="$userid3:" pswd="$pswd3:" print-response='no'>
+				<method>WAITCOUNT 1</method>
+				<ruri>$notificationpath3:/</ruri>
+			</request>
+			<request user="$userid3:" pswd="$pswd3:" print-response='no'>
+				<method>GETNEW</method>
+				<ruri>$notificationpath3:/</ruri>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/unshare/shareruninvite/7.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-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/20120919/99cd3981/attachment-0001.html>


More information about the calendarserver-changes mailing list