[CalendarServer-changes] [5843] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Tue Jul 6 12:15:15 PDT 2010


Revision: 5843
          http://trac.macosforge.org/projects/calendarserver/changeset/5843
Author:   cdaboo at apple.com
Date:     2010-07-06 12:15:15 -0700 (Tue, 06 Jul 2010)
Log Message:
-----------
Fix DTDs. Add tests for pre-condition on MOVE.

Modified Paths:
--------------
    CalDAVTester/trunk/scripts/server/serverinfo.dtd
    CalDAVTester/trunk/scripts/tests/CalDAV/caldavtest.dtd
    CalDAVTester/trunk/scripts/tests/CalDAV/copymove.xml

Added Paths:
-----------
    CalDAVTester/trunk/Resource/Common/PROPFIND/getetag.xml

Added: CalDAVTester/trunk/Resource/Common/PROPFIND/getetag.xml
===================================================================
--- CalDAVTester/trunk/Resource/Common/PROPFIND/getetag.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/Common/PROPFIND/getetag.xml	2010-07-06 19:15:15 UTC (rev 5843)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:getetag/>
+</D:prop>
+</D:propfind>

Modified: CalDAVTester/trunk/scripts/server/serverinfo.dtd
===================================================================
--- CalDAVTester/trunk/scripts/server/serverinfo.dtd	2010-07-03 17:54:52 UTC (rev 5842)
+++ CalDAVTester/trunk/scripts/server/serverinfo.dtd	2010-07-06 19:15:15 UTC (rev 5843)
@@ -20,7 +20,7 @@
 	<!ELEMENT port			(#PCDATA)>
 	<!ELEMENT authtype		(#PCDATA)>
 	<!ELEMENT ssl			EMPTY>
-	<!ELEMENT features      feature*>
+	<!ELEMENT features      (feature*)>
 		<!ELEMENT feature   (#PCDATA)>
 	<!ELEMENT substitutions	(substitution|repeat)*>
 		<!ELEMENT repeat	(substitution+)>

Modified: CalDAVTester/trunk/scripts/tests/CalDAV/caldavtest.dtd
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/caldavtest.dtd	2010-07-03 17:54:52 UTC (rev 5842)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/caldavtest.dtd	2010-07-06 19:15:15 UTC (rev 5843)
@@ -19,7 +19,7 @@
 
 	<!ELEMENT description (#PCDATA)>
 
-	<!ELEMENT require-feature feature*>
+	<!ELEMENT require-feature (feature*)>
 		<!ELEMENT feature (#PCDATA)>
 
 	<!ELEMENT start (request*)>

Modified: CalDAVTester/trunk/scripts/tests/CalDAV/copymove.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/copymove.xml	2010-07-03 17:54:52 UTC (rev 5842)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/copymove.xml	2010-07-06 19:15:15 UTC (rev 5843)
@@ -375,10 +375,30 @@
 		</test>
 		<test name='4'>
 			<description>MOVE to different calendar, new resource</description>
+			<request print-response='yes'>
+				<method>PROPFIND</method>
+				<ruri>move1.ics</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/Common/PROPFIND/getetag.xml</filepath>
+				</data>
+				<grabproperty>
+					<property>DAV:getetag</property>
+					<variable>$getetag:</variable>
+				</grabproperty>
+			</request>
 			<request>
 				<method>MOVE</method>
 				<ruri>$calendarpath1:/move1.ics</ruri>
 				<header>
+					<name>If-Match</name>
+					<value>$getetag:</value>
+				</header>
+				<header>
 					<name>Destination</name>
 					<value>$host:$pathprefix1:/calendar2/move2_1.ics</value>
 				</header>
@@ -393,10 +413,30 @@
 		</test>
 		<test name='5'>
 			<description>MOVE to different calendar, existing resource with overwrite</description>
+			<request print-response='yes'>
+				<method>PROPFIND</method>
+				<ruri>$calendarpath1:/3.ics</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/Common/PROPFIND/getetag.xml</filepath>
+				</data>
+				<grabproperty>
+					<property>DAV:getetag</property>
+					<variable>$getetag:</variable>
+				</grabproperty>
+			</request>
 			<request>
 				<method>MOVE</method>
 				<ruri>$calendarpath1:/3.ics</ruri>
 				<header>
+					<name>If-Match</name>
+					<value>$getetag:</value>
+				</header>
+				<header>
 					<name>Destination</name>
 					<value>$host:$pathprefix1:/calendar2/3.ics</value>
 				</header>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100706/f875f1ab/attachment.html>


More information about the calendarserver-changes mailing list