[CalendarServer-changes] [449] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Mon Nov 13 19:54:48 PST 2006


Revision: 449
          http://trac.macosforge.org/projects/calendarserver/changeset/449
Author:   cdaboo at apple.com
Date:     2006-11-13 19:54:48 -0800 (Mon, 13 Nov 2006)

Log Message:
-----------
Tests for notification feature.

Added Paths:
-----------
    CalDAVTester/trunk/Resource/dropbox/4.xml
    CalDAVTester/trunk/scripts/tests/notifications.xml

Added: CalDAVTester/trunk/Resource/dropbox/4.xml
===================================================================
--- CalDAVTester/trunk/Resource/dropbox/4.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/dropbox/4.xml	2006-11-14 03:54:48 UTC (rev 449)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:" xmlns:A="http://apple.com/ns/calendarserver/">
+<D:prop>
+<A:time-stamp/>
+<A:changed/>
+</D:prop>
+</D:propfind>

Added: CalDAVTester/trunk/scripts/tests/notifications.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/notifications.xml	                        (rev 0)
+++ CalDAVTester/trunk/scripts/tests/notifications.xml	2006-11-14 03:54:48 UTC (rev 449)
@@ -0,0 +1,210 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006 Apple Computer, 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.
+
+ DRI: Cyrus Daboo, cdaboo at apple.com
+ -->
+
+<caldavtest ignore-all="yes">
+	<description>Test drop box notification features</description>
+
+	<start>
+		<request end-delete='yes'>
+			<method>MKCOL</method>
+			<ruri>$pathprefix:/dropbox/ABC1/</ruri>
+		</request>
+		<request end-delete='yes'>
+			<method>MKCOL</method>
+			<ruri>$pathprefix:/dropbox/ABC2/</ruri>
+		</request>
+		<request>
+			<method>DELETEALL</method>
+			<ruri>$pathprefix:/notifications/</ruri>
+		</request>
+		<request>
+			<method>X_APPLE_SUBSCRIBE</method>
+			<ruri>$pathprefix:/dropbox/ABC2/</ruri>
+		</request>
+	</start>
+	
+	<test-suite name='No notifications'>
+		<test name='1'>
+			<description>Create drop box resource</description>
+			<request>
+				<method>PUT</method>
+				<ruri>$pathprefix:/dropbox/ABC1/test.xml</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/dropbox/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>No notifications</description>
+			<request print-response="no">
+				<method>PROPFIND</method>
+				<header>
+					<name>Depth</name>
+					<value>1</value>
+				</header>
+				<ruri>$pathprefix:/notifications/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/dropbox/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>count</name>
+						<value>0</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<test-suite name='PUT Notification'>
+		<test name='1'>
+			<description>Create drop box resource</description>
+			<request>
+				<method>PUT</method>
+				<ruri>$pathprefix:/dropbox/ABC2/test.xml</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/dropbox/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Notifications</description>
+			<request print-response="no">
+				<method>PROPFIND</method>
+				<header>
+					<name>Depth</name>
+					<value>1</value>
+				</header>
+				<ruri>$pathprefix:/notifications/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/dropbox/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>count</name>
+						<value>1</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>ignore</name>
+						<value>$pathprefix:/notifications/</value>
+					</arg>
+					<arg>
+						<name>okprops</name>
+						<value>http://apple.com/ns/calendarserver/time-stamp</value>
+						<value>http://apple.com/ns/calendarserver/changed$&lt;href xmlns="DAV:"&gt;$pathprefix:/dropbox/ABC2/&lt;/href&gt;</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<test-suite name='DELETE Notification'>
+		<test name='1'>
+			<description>Remove existing notifications</description>
+			<request>
+				<method>DELETEALL</method>
+				<ruri>$pathprefix:/notifications/</ruri>
+			</request>
+			<request print-response="no">
+				<method>PROPFIND</method>
+				<header>
+					<name>Depth</name>
+					<value>1</value>
+				</header>
+				<ruri>$pathprefix:/notifications/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/dropbox/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>count</name>
+						<value>0</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Delete drop box resource</description>
+			<request>
+				<method>DELETE</method>
+				<ruri>$pathprefix:/dropbox/ABC2/test.xml</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Notifications</description>
+			<request print-response="no">
+				<method>PROPFIND</method>
+				<header>
+					<name>Depth</name>
+					<value>1</value>
+				</header>
+				<ruri>$pathprefix:/notifications/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/dropbox/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>count</name>
+						<value>1</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>ignore</name>
+						<value>$pathprefix:/notifications/</value>
+					</arg>
+					<arg>
+						<name>okprops</name>
+						<value>http://apple.com/ns/calendarserver/time-stamp</value>
+						<value>http://apple.com/ns/calendarserver/changed$&lt;href xmlns="DAV:"&gt;$pathprefix:/dropbox/ABC2/&lt;/href&gt;</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/20061113/58bf4f6a/attachment.html


More information about the calendarserver-changes mailing list