[CalendarServer-changes] [6190] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Thu Aug 26 08:32:44 PDT 2010


Revision: 6190
          http://trac.macosforge.org/projects/calendarserver/changeset/6190
Author:   cdaboo at apple.com
Date:     2010-08-26 08:32:41 -0700 (Thu, 26 Aug 2010)
Log Message:
-----------
Directory-gateway tests.

Added Paths:
-----------
    CalDAVTester/trunk/Resource/CardDAV/directory-gateway/
    CalDAVTester/trunk/Resource/CardDAV/directory-gateway/1.xml
    CalDAVTester/trunk/scripts/tests/CardDAV/directory-gateway.xml

Added: CalDAVTester/trunk/Resource/CardDAV/directory-gateway/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/directory-gateway/1.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/directory-gateway/1.xml	2010-08-26 15:32:41 UTC (rev 6190)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav">
+<D:prop>
+<C:directory-gateway/>
+</D:prop>
+</D:propfind>

Added: CalDAVTester/trunk/scripts/tests/CardDAV/directory-gateway.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CardDAV/directory-gateway.xml	                        (rev 0)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/directory-gateway.xml	2010-08-26 15:32:41 UTC (rev 6190)
@@ -0,0 +1,86 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2009 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>Test GET on collections to ensure proper directory listing</description>
+	
+	<require-feature>
+		<feature>carddav</feature>
+		<feature>directory-gateway</feature>
+	</require-feature>
+
+	<start/>
+
+	<test-suite name='Find the gateway'>
+		<test name='1'>
+			<description>PROPFIND of principal for gateway</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$principal1:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/directory-gateway/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>urn:ietf:params:xml:ns:carddavdirectory-gateway</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>/{DAV:}multistatus/{DAV:}response/{DAV:}propstat/{DAV:}prop/{urn:ietf:params:xml:ns:carddav}directory-gateway/{DAV:}href</name>
+					<variable>$gateway1:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='2'>
+			<description>PROPFIND of gateway</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$gateway1:</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/Common/PROPFIND/resourcetype.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:resourcetype$.*collection[^-].*</value>
+						<value>DAV:resourcetype$.*addressbook[^-].*</value>
+						<value>DAV:resourcetype$.*directory[^-].*</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<end/>
+	
+</caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100826/62c413ef/attachment.html>


More information about the calendarserver-changes mailing list