[CalendarServer-changes] [13349] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Mon Apr 21 12:50:13 PDT 2014


Revision: 13349
          http://trac.calendarserver.org//changeset/13349
Author:   cdaboo at apple.com
Date:     2014-04-21 12:50:13 -0700 (Mon, 21 Apr 2014)
Log Message:
-----------
Test splitting using client supplied past-UID.

Modified Paths:
--------------
    CalDAVTester/trunk/scripts/tests/CalDAV/recurrence-splitting.xml

Added Paths:
-----------
    CalDAVTester/trunk/Resource/CalDAV/recurrence-splitting/simple/6.ics

Added: CalDAVTester/trunk/Resource/CalDAV/recurrence-splitting/simple/6.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/recurrence-splitting/simple/6.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/recurrence-splitting/simple/6.ics	2014-04-21 19:50:13 UTC (rev 13349)
@@ -0,0 +1,14 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Example Inc.//Example Calendar//EN
+VERSION:2.0
+BEGIN:VEVENT
+DTSTAMP:20051222T205953Z
+DTSTART:$now.-10:T120000Z
+DURATION:PT1H
+SUMMARY:event 1
+UID:XXXX-YYYY-ZZZZ
+RELATED-TO;RELTYPE=X-CALENDARSERVER-RECURRENCE-SET:$relid:
+RRULE:FREQ=DAILY;UNTIL=$now.0:T115959Z
+END:VEVENT
+END:VCALENDAR

Modified: CalDAVTester/trunk/scripts/tests/CalDAV/recurrence-splitting.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/recurrence-splitting.xml	2014-04-21 18:39:03 UTC (rev 13348)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/recurrence-splitting.xml	2014-04-21 19:50:13 UTC (rev 13349)
@@ -641,6 +641,175 @@
 		</test>
 	</test-suite>
 
+	<test-suite name='Client set past UID'>
+		<test name='1'>
+			<description>Create event</description>
+			<request>
+				<method>PUT</method>
+				<ruri>$calendarpath1:/1.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/recurrence-splitting/simple/1.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>POST to split</description>
+			<request>
+				<method>POST</method>
+				<ruri>$calendarpath1:/1.ics?action=split&amp;rid=$now.0:T000000Z&amp;uid=XXXX-YYYY-ZZZZ</ruri>
+				<header>
+					<name>Prefer</name>
+					<value>return=representation</value>
+				</header>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>totalcount</name>
+						<value>2</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>xmlElementMatch</callback>
+					<arg>
+						<name>exists</name>
+						<value>$verify-property-prefix:/{DAV:}getetag</value>
+						<value>$verify-property-prefix:/{urn:ietf:params:xml:ns:caldav}calendar-data</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>$multistatus-href-prefix:</name>
+					<variable>$href1:</variable>
+					<variable>$href2:</variable>
+				</grabelement>
+			</request>
+			<request>
+				<method>GET</method>
+				<ruri>$href2:</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<grabcalproperty>
+					<name>VEVENT/UID</name>
+					<variable>$olduid:</variable>
+				</grabcalproperty>
+				<grabcalproperty>
+					<name>VEVENT/RELATED-TO</name>
+					<variable>$relid:</variable>
+				</grabcalproperty>
+			</request>
+		</test>
+		<test name='3'>
+			<description>GET new-part split (original) resource</description>
+			<request>
+				<method>GET</method>
+				<ruri>$href1:</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/recurrence-splitting/simple/2.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4'>
+			<description>GET old-part split (new resource)</description>
+			<request>
+				<method>GET</method>
+				<ruri>$href2:</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/recurrence-splitting/simple/3.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='-1'>
+			<description>Clean-up</description>
+			<request>
+				<method>DELETEALL</method>
+				<ruri>$calendarpath1:/</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<test-suite name='Client set invalid past UID'>
+		<test name='1'>
+			<description>Create event</description>
+			<request>
+				<method>PUT</method>
+				<ruri>$calendarpath1:/1.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/recurrence-splitting/simple/1.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>POST to split</description>
+			<request>
+				<method>POST</method>
+				<ruri>$calendarpath1:/1.ics?action=split&amp;rid=$now.0:T000000Z&amp;uid=event1</ruri>
+				<header>
+					<name>Prefer</name>
+					<value>return=representation</value>
+				</header>
+				<verify>
+					<callback>prepostcondition</callback>
+					<arg>
+						<name>error</name>
+						<value>{urn:ietf:params:xml:ns:caldav}unique-scheduling-object-resource</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Original unchanged</description>
+			<request>
+				<method>GET</method>
+				<ruri>$href1:</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/recurrence-splitting/simple/1.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='-1'>
+			<description>Clean-up</description>
+			<request>
+				<method>DELETEALL</method>
+				<ruri>$calendarpath1:/</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
 	<end/>
 	
 </caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140421/69a9a87f/attachment.html>


More information about the calendarserver-changes mailing list