[CalendarServer-changes] [15159] CalDAVTester/trunk/scripts/tests/CalDAV/server-info.xml

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 30 01:41:10 PDT 2015


Revision: 15159
          http://trac.calendarserver.org//changeset/15159
Author:   cdaboo at apple.com
Date:     2015-09-30 01:41:09 -0700 (Wed, 30 Sep 2015)
Log Message:
-----------
Update to latest draft.

Modified Paths:
--------------
    CalDAVTester/trunk/scripts/tests/CalDAV/server-info.xml

Modified: CalDAVTester/trunk/scripts/tests/CalDAV/server-info.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/server-info.xml	2015-09-29 11:46:02 UTC (rev 15158)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/server-info.xml	2015-09-30 08:41:09 UTC (rev 15159)
@@ -38,7 +38,7 @@
 					<callback>header</callback>
 					<arg>
 						<name>header</name>
-						<value>server-info-token</value>
+						<value>server-info-url</value>
 					</arg>
 				</verify>
 			</request>
@@ -52,7 +52,7 @@
 					<callback>header</callback>
 					<arg>
 						<name>header</name>
-						<value>server-info-token</value>
+						<value>server-info-url</value>
 					</arg>
 				</verify>
 			</request>
@@ -66,7 +66,7 @@
 					<callback>header</callback>
 					<arg>
 						<name>header</name>
-						<value>server-info-token</value>
+						<value>server-info-url</value>
 					</arg>
 				</verify>
 			</request>
@@ -80,122 +80,157 @@
 					<callback>header</callback>
 					<arg>
 						<name>header</name>
-						<value>server-info-token</value>
+						<value>server-info-url</value>
 					</arg>
 				</verify>
 			</request>
 		</test>
+		<test name='5'>
+			<description>OPTIONS on root resource with header</description>
+			<request>
+				<method>OPTIONS</method>
+				<ruri>$root:</ruri>
+				<header>
+					<name>server-info-token</name>
+					<value>*</value>
+				</header>
+				<verify>
+					<callback>header</callback>
+					<arg>
+						<name>header</name>
+						<value>server-info-url</value>
+					</arg>
+				</verify>
+				<grabheader>
+					<name>server-info-url</name>
+					<variable>$serverinfo_href:</variable>
+				</grabheader>
+			</request>
+		</test>
 	</test-suite>
 
-	<test-suite name='PROPFINDs'>
+	<test-suite name='GET'>
 		<test name='1'>
-			<description>PROPFIND on principal collection resourc</description>
+			<description>GET on resource</description>
 			<request>
-				<method>PROPFIND</method>
-				<ruri>$principalcollection:</ruri>
-				<header>
-					<name>Depth</name>
-					<value>0</value>
-				</header>
-				<data>
-					<content-type>application/xml; charset=utf-8</content-type>
-					<filepath>Resource/CalDAV/serverinfo/1.xml</filepath>
-				</data>
+				<method>GET</method>
+				<ruri>$serverinfo_href:</ruri>
 				<verify>
 					<callback>xmlElementMatch</callback>
 					<arg>
 						<name>exists</name>
-						<value>$verify-property-prefix:/{DAV:}server-info-href</value>
+						<value>/{DAV:}server-info/{DAV:}token</value>
+						<value>/{DAV:}server-info/{DAV:}features</value>
+						<value>/{DAV:}server-info/{DAV:}features/{DAV:}class-1</value>
+						<value>/{DAV:}server-info/{DAV:}applications/{DAV:}application/{DAV:}name[=caldav]</value>
 					</arg>
 				</verify>
+				<grabelement>
+					<name>/{DAV:}server-info/{DAV:}token</name>
+					<variable>$server-info-token:</variable>
+				</grabelement>
 			</request>
 		</test>
+	</test-suite>
+
+	<test-suite name='Conditional OPTIONS'>
+		<test name='1'>
+			<description>OPTIONS on root resource with correct header</description>
+			<request>
+				<method>OPTIONS</method>
+				<ruri>$root:</ruri>
+				<header>
+					<name>Server-Info-Token</name>
+					<value>$server-info-token:</value>
+				</header>
+				<verify>
+					<callback>header</callback>
+					<arg>
+						<name>header</name>
+						<value>!server-info-url</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
 		<test name='2'>
-			<description>PROPFIND on principal resource</description>
+			<description>OPTIONS on root resource with incorrect header</description>
 			<request>
-				<method>PROPFIND</method>
-				<ruri>$principal1:</ruri>
+				<method>OPTIONS</method>
+				<ruri>$root:</ruri>
 				<header>
-					<name>Depth</name>
-					<value>0</value>
+					<name>Server-Info-Token</name>
+					<value>foobar</value>
 				</header>
-				<data>
-					<content-type>application/xml; charset=utf-8</content-type>
-					<filepath>Resource/CalDAV/serverinfo/1.xml</filepath>
-				</data>
 				<verify>
-					<callback>xmlElementMatch</callback>
+					<callback>header</callback>
 					<arg>
-						<name>exists</name>
-						<value>$verify-property-prefix:/{DAV:}server-info-href</value>
+						<name>header</name>
+						<value>server-info-url</value>
 					</arg>
 				</verify>
 			</request>
 		</test>
-		<test name='3'>
-			<description>PROPFIND on home resource</description>
+	</test-suite>
+
+	<test-suite name='Conditional REPORT'>
+		<test name='1'>
+			<description>Calendar home sync with correct header</description>
 			<request>
-				<method>PROPFIND</method>
+				<method>REPORT</method>
 				<ruri>$calendarhome1:/</ruri>
 				<header>
-					<name>Depth</name>
-					<value>0</value>
+					<name>Server-Info-Token</name>
+					<value>$server-info-token:</value>
 				</header>
 				<data>
-					<content-type>application/xml; charset=utf-8</content-type>
-					<filepath>Resource/CalDAV/serverinfo/1.xml</filepath>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/Common/REPORT/sync-init-level-1.xml</filepath>
 				</data>
 				<verify>
-					<callback>xmlElementMatch</callback>
+					<callback>header</callback>
 					<arg>
-						<name>exists</name>
-						<value>$verify-property-prefix:/{DAV:}server-info-href</value>
+						<name>header</name>
+						<value>!server-info-url</value>
 					</arg>
 				</verify>
-				<grabelement>
-					<name>$verify-property-prefix:/{DAV:}server-info-href/{DAV:}href</name>
-					<variable>$serverinfo_href:</variable>
-				</grabelement>
 			</request>
 		</test>
-		<test name='4' ignore='yes'>
-			<description>PROPFIND on root resource</description>
+		<test name='2'>
+			<description>Calendar home sync with incorrect header</description>
 			<request>
-				<method>PROPFIND</method>
-				<ruri>$root:</ruri>
+				<method>REPORT</method>
+				<ruri>$calendarhome1:/</ruri>
 				<header>
-					<name>Depth</name>
-					<value>0</value>
+					<name>Server-Info-Token</name>
+					<value>foobar</value>
 				</header>
 				<data>
-					<content-type>application/xml; charset=utf-8</content-type>
-					<filepath>Resource/CalDAV/serverinfo/1.xml</filepath>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/Common/REPORT/sync-init-level-1.xml</filepath>
 				</data>
 				<verify>
-					<callback>xmlElementMatch</callback>
+					<callback>header</callback>
 					<arg>
-						<name>notexists</name>
-						<value>$verify-property-prefix:/{DAV:}server-info-href</value>
+						<name>header</name>
+						<value>server-info-url</value>
 					</arg>
 				</verify>
 			</request>
 		</test>
-	</test-suite>
-
-	<test-suite name='GET'>
-		<test name='1'>
-			<description>GET on resource</description>
+		<test name='3'>
+			<description>Calendar home sync with no header</description>
 			<request>
-				<method>GET</method>
-				<ruri>$serverinfo_href:</ruri>
+				<method>REPORT</method>
+				<ruri>$calendarhome1:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/Common/REPORT/sync-init-level-1.xml</filepath>
+				</data>
 				<verify>
-					<callback>xmlElementMatch</callback>
+					<callback>header</callback>
 					<arg>
-						<name>exists</name>
-						<value>/{DAV:}server-info/{DAV:}token</value>
-						<value>/{DAV:}server-info/{DAV:}features</value>
-						<value>/{DAV:}server-info/{DAV:}features/{DAV:}class-1</value>
-						<value>/{DAV:}server-info/{DAV:}applications/{DAV:}application/{DAV:}name[=caldav]</value>
+						<name>header</name>
+						<value>!server-info-url</value>
 					</arg>
 				</verify>
 			</request>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150930/ba98c2a7/attachment.html>


More information about the calendarserver-changes mailing list