[CalendarServer-changes] [15155] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Tue Sep 29 01:12:33 PDT 2015


Revision: 15155
          http://trac.calendarserver.org//changeset/15155
Author:   cdaboo at apple.com
Date:     2015-09-29 01:12:33 -0700 (Tue, 29 Sep 2015)
Log Message:
-----------
Server-info spec tests.

Modified Paths:
--------------
    CalDAVTester/trunk/scripts/server/serverinfo.xml

Added Paths:
-----------
    CalDAVTester/trunk/Resource/CalDAV/serverinfo/
    CalDAVTester/trunk/Resource/CalDAV/serverinfo/1.xml
    CalDAVTester/trunk/scripts/tests/CalDAV/server-info.xml

Added: CalDAVTester/trunk/Resource/CalDAV/serverinfo/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/serverinfo/1.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/serverinfo/1.xml	2015-09-29 08:12:33 UTC (rev 15155)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:server-info-href/>
+</D:prop>
+</D:propfind>

Modified: CalDAVTester/trunk/scripts/server/serverinfo.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/serverinfo.xml	2015-09-25 15:58:15 UTC (rev 15154)
+++ CalDAVTester/trunk/scripts/server/serverinfo.xml	2015-09-29 08:12:33 UTC (rev 15155)
@@ -62,6 +62,7 @@
 		<feature>quota</feature>						<!-- WebDAV QUOTA -->
 		<!-- <feature>quota-on-resources</feature> -->	<!-- WebDAV QUOTA on calendar and address book object resources -->
 		<feature>resource-id</feature>					<!-- WebDAV BIND DAV:resource-id property -->
+		<!-- <feature>server-info</feature> -->			<!-- WebDAV server-info document -->
 		<feature>sync-report</feature>					<!-- WebDAV collection sync REPORT -->
 		<!-- <feature>sync-report-limit</feature> -->	<!-- WebDAV collection sync REPORT DAV:limit support -->
 		<feature>sync-report-home</feature>				<!-- WebDAV collection sync REPORT on Homes -->

Added: CalDAVTester/trunk/scripts/tests/CalDAV/server-info.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/server-info.xml	                        (rev 0)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/server-info.xml	2015-09-29 08:12:33 UTC (rev 15155)
@@ -0,0 +1,207 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2015 Apple Inc. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<caldavtest>
+	<description>Server-info document</description>
+
+	<require-feature>
+		<feature>caldav</feature>
+		<feature>server-info</feature>
+	</require-feature>
+
+	<start/>
+	
+	<test-suite name='OPTIONS'>
+		<test name='1'>
+			<description>OPTIONS on principal collection resource</description>
+			<request>
+				<method>OPTIONS</method>
+				<ruri>$principalcollection:</ruri>
+				<verify>
+					<callback>header</callback>
+					<arg>
+						<name>header</name>
+						<value>server-info-token</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>OPTIONS on principal resource</description>
+			<request>
+				<method>OPTIONS</method>
+				<ruri>$principal1:</ruri>
+				<verify>
+					<callback>header</callback>
+					<arg>
+						<name>header</name>
+						<value>server-info-token</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>OPTIONS on home resource</description>
+			<request>
+				<method>OPTIONS</method>
+				<ruri>$calendarhome1:/</ruri>
+				<verify>
+					<callback>header</callback>
+					<arg>
+						<name>header</name>
+						<value>server-info-token</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4'>
+			<description>OPTIONS on root resource</description>
+			<request>
+				<method>OPTIONS</method>
+				<ruri>$root:</ruri>
+				<verify>
+					<callback>header</callback>
+					<arg>
+						<name>header</name>
+						<value>server-info-token</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<test-suite name='PROPFINDs'>
+		<test name='1'>
+			<description>PROPFIND on principal collection resourc</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>
+				<verify>
+					<callback>xmlElementMatch</callback>
+					<arg>
+						<name>exists</name>
+						<value>$verify-property-prefix:/{DAV:}server-info-href</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>PROPFIND on principal resource</description>
+			<request>
+				<method>PROPFIND</method>
+				<ruri>$principal1:</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>
+				<verify>
+					<callback>xmlElementMatch</callback>
+					<arg>
+						<name>exists</name>
+						<value>$verify-property-prefix:/{DAV:}server-info-href</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>PROPFIND on home resource</description>
+			<request>
+				<method>PROPFIND</method>
+				<ruri>$calendarhome1:/</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>
+				<verify>
+					<callback>xmlElementMatch</callback>
+					<arg>
+						<name>exists</name>
+						<value>$verify-property-prefix:/{DAV:}server-info-href</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>
+			<request>
+				<method>PROPFIND</method>
+				<ruri>$root:</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>
+				<verify>
+					<callback>xmlElementMatch</callback>
+					<arg>
+						<name>notexists</name>
+						<value>$verify-property-prefix:/{DAV:}server-info-href</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<test-suite name='GET'>
+		<test name='1'>
+			<description>GET on resource</description>
+			<request>
+				<method>GET</method>
+				<ruri>$serverinfo_href:</ruri>
+				<verify>
+					<callback>xmlElementMatch</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>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<end/>
+	
+</caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150929/a8de6136/attachment.html>


More information about the calendarserver-changes mailing list