[CalendarServer-changes] [9912] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Tue Oct 9 13:21:50 PDT 2012


Revision: 9912
          http://trac.calendarserver.org//changeset/9912
Author:   cdaboo at apple.com
Date:     2012-10-09 13:21:50 -0700 (Tue, 09 Oct 2012)
Log Message:
-----------
Check that properties are correct when retrieved via Depth:1 on the home.

Modified Paths:
--------------
    CalDAVTester/trunk/Resource/CalDAV/propfinds/1.txt
    CalDAVTester/trunk/scripts/tests/CalDAV/mkcalendar.xml
    CalDAVTester/trunk/scripts/tests/CalDAV/propfind.xml
    CalDAVTester/trunk/verifiers/propfindValues.py

Modified: CalDAVTester/trunk/Resource/CalDAV/propfinds/1.txt
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/propfinds/1.txt	2012-10-09 20:13:47 UTC (rev 9911)
+++ CalDAVTester/trunk/Resource/CalDAV/propfinds/1.txt	2012-10-09 20:21:50 UTC (rev 9912)
@@ -3,6 +3,8 @@
 <D:prop>
 <D:getcontentlength/>
 <D:getcontenttype/>
+<D:getlastmodified/>
+<D:creationdate/>
 <D:resourcetype/>
 <D:getetag/>
 <D:displayname/>

Modified: CalDAVTester/trunk/scripts/tests/CalDAV/mkcalendar.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/mkcalendar.xml	2012-10-09 20:13:47 UTC (rev 9911)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/mkcalendar.xml	2012-10-09 20:21:50 UTC (rev 9912)
@@ -474,6 +474,65 @@
 			</request>
 		</test>
 		<test name='3'>
+			<description>Calendar Home checkj</description>
+			<request>
+				<method>PROPFIND</method>
+				<ruri>$calendarhome1:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>1</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/mkcalendar/single-components/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>only</name>
+						<value>$calendarpath1:/</value>
+					</arg>
+					<arg>
+						<name>props</name>
+						<value>{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set$.*VEVENT.*</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>only</name>
+						<value>$calendarpath1:/</value>
+					</arg>
+					<arg>
+						<name>props</name>
+						<value>{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set!.*VTODO.*</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>only</name>
+						<value>$taskspath1:/</value>
+					</arg>
+					<arg>
+						<name>props</name>
+						<value>{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set!.*VEVENT.*</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>only</name>
+						<value>$taskspath1:/</value>
+					</arg>
+					<arg>
+						<name>props</name>
+						<value>{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set$.*VTODO.*</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4'>
 			<description>Simple MKCALENDAR</description>
 			<request end-delete='yes'>
 				<method>MKCALENDAR</method>

Modified: CalDAVTester/trunk/scripts/tests/CalDAV/propfind.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/propfind.xml	2012-10-09 20:13:47 UTC (rev 9911)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/propfind.xml	2012-10-09 20:21:50 UTC (rev 9912)
@@ -25,11 +25,94 @@
 
 	<start/>
 	
-	<test-suite name='regular prop finds'>
+	<test-suite name='regular home prop finds'>
 		<test name='1'>
 			<description>PROPFIND of basic properties depth=0</description>
 			<request>
 				<method>PROPFIND</method>
+				<ruri>$calendarhome1:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/propfinds/1.txt</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>PROPFIND of basic properties depth=1</description>
+			<request>
+				<method>PROPFIND</method>
+				<ruri>$calendarhome1:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>1</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/propfinds/1.txt</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>PROPFIND of basic properties depth=infinity</description>
+			<request>
+				<method>PROPFIND</method>
+				<ruri>$calendarhome1:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>infinity</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/propfinds/1.txt</filepath>
+				</data>
+				<verify>
+					<callback>prepostcondition</callback>
+					<arg>
+						<name>error</name>
+						<value>{DAV:}propfind-finite-depth</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4'>
+			<description>PROPFIND getcontentlength=0</description>
+			<request>
+				<method>PROPFIND</method>
+				<ruri>$calendarhome1:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/propfinds/7.txt</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>{DAV:}getcontentlength$</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<test-suite name='regular calendar prop finds'>
+		<test name='1'>
+			<description>PROPFIND of basic properties depth=0</description>
+			<request>
+				<method>PROPFIND</method>
 				<ruri>$calendarpath1:/</ruri>
 				<header>
 					<name>Depth</name>
@@ -108,6 +191,7 @@
 		</test>
 	</test-suite>
 	
+	
 	<test-suite name='prop names'>
 		<test name='1'>
 			<description>PROPFIND of property names depth=0</description>

Modified: CalDAVTester/trunk/verifiers/propfindValues.py
===================================================================
--- CalDAVTester/trunk/verifiers/propfindValues.py	2012-10-09 20:13:47 UTC (rev 9911)
+++ CalDAVTester/trunk/verifiers/propfindValues.py	2012-10-09 20:21:50 UTC (rev 9912)
@@ -28,6 +28,7 @@
 
         # If no status verification requested, then assume all 2xx codes are OK
         ignores = args.get("ignore", [])
+        only = args.get("only", [])
 
         def normalizeXML(value):
 
@@ -79,6 +80,8 @@
             href = href[0].text
             if href in ignores:
                 continue
+            if only and href not in only:
+                continue
 
             # Get all property status
             ok_status_props = {}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20121009/06d6c3dc/attachment.html>


More information about the calendarserver-changes mailing list