[CalendarServer-changes] [6351] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Thu Sep 23 08:36:15 PDT 2010


Revision: 6351
          http://trac.macosforge.org/projects/calendarserver/changeset/6351
Author:   cdaboo at apple.com
Date:     2010-09-23 08:36:14 -0700 (Thu, 23 Sep 2010)
Log Message:
-----------
Test synchronization of notification collection contents.

Added Paths:
-----------
    CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/
    CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/1.xml
    CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/2.xml
    CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/3.xml
    CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/4.xml
    CalDAVTester/trunk/scripts/tests/CalDAV/sharing-notification-sync.xml

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/1.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/1.xml	2010-09-23 15:36:14 UTC (rev 6351)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:supported-report-set/>
+</D:prop>
+</D:propfind>

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/2.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/2.xml	2010-09-23 15:36:14 UTC (rev 6351)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token/>
+</D:sync-collection>

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/3.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/3.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/3.xml	2010-09-23 15:36:14 UTC (rev 6351)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<CS:share xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/">
+    <CS:set>
+        <D:href>$cuaddr2:</D:href>
+        <CS:summary>My Shared Calendar</CS:summary>
+        <CS:read-write/>
+    </CS:set>
+</CS:share>

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/4.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/4.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/notification-sync/4.xml	2010-09-23 15:36:14 UTC (rev 6351)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:sync-collection xmlns:D="DAV:">
+<D:sync-token>$synctoken2:</D:sync-token>
+</D:sync-collection>

Added: CalDAVTester/trunk/scripts/tests/CalDAV/sharing-notification-sync.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/sharing-notification-sync.xml	                        (rev 0)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/sharing-notification-sync.xml	2010-09-23 15:36:14 UTC (rev 6351)
@@ -0,0 +1,214 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2010 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 calendar sharing calendars</description>
+
+	<require-feature>
+		<feature>caldav</feature>
+		<feature>shared-calendars</feature>
+		<feature>sync-report</feature>
+	</require-feature>
+
+	<start>
+		<request user="$userid1:" pswd="$pswd1:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath1:/</ruri>
+		</request>
+		<request user="$userid2:" pswd="$pswd2:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath2:/</ruri>
+		</request>
+		<request end-delete="yes">
+			<method>MKCALENDAR</method>
+			<ruri>$pathprefix1:/shared/</ruri>
+			<data>
+				<content-type>text/xml; charset=utf-8</content-type>
+				<filepath>Resource/Common/MKCALENDAR/sharedcalendar.xml</filepath>
+			</data>
+			<verify>
+				<callback>statusCode</callback>
+			</verify>
+		</request>
+		<request print-response='no'>
+			<method>PROPPATCH</method>
+			<ruri>$pathprefix1:/shared/</ruri>
+			<data>
+				<content-type>text/xml; charset=utf-8</content-type>
+				<filepath>Resource/Common/PROPPATCH/calendar-transp-opaque.xml</filepath>
+			</data>
+		</request>
+	</start>
+	
+	<test-suite name='support-report-set' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>On notification collection</description>
+			<request print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$notificationpath1:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>xmlElementMatch</callback>
+					<arg>
+						<name>exists</name>
+						<value>$verify-property-prefix:/{DAV:}supported-report-set/{DAV:}supported-report/{DAV:}report/{DAV:}sync-collection</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<test-suite name='initial tokens' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>initial query - grab token</description>
+			<request print-response='no'>
+				<method>REPORT</method>
+				<ruri>$notificationpath1:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>totalcount</name>
+						<value>0</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>/{DAV:}multistatus/{DAV:}sync-token</name>
+					<variable>$synctoken1:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>initial query - grab token</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>REPORT</method>
+				<ruri>$notificationpath2:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>totalcount</name>
+						<value>0</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>/{DAV:}multistatus/{DAV:}sync-token</name>
+					<variable>$synctoken2:</variable>
+				</grabelement>
+			</request>
+		</test>
+	</test-suite>
+
+	<test-suite name='Read-write calendar'>
+		<test name='1' ignore='no'>
+			<description>POST invitation</description>
+			<request print-response='no'>
+				<method>POST</method>
+				<ruri>$pathprefix1:/shared/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>new resource</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>WAITCOUNT 1</method>
+				<ruri>$notificationpath2:/</ruri>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>REPORT</method>
+				<ruri>$notificationpath2:/</ruri>
+				<data substitutions='yes'>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>totalcount</name>
+						<value>1</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>/{DAV:}multistatus/{DAV:}sync-token</name>
+					<variable>$synctoken2:</variable>
+				</grabelement>
+				<grabelement>
+					<name>/{DAV:}multistatus/{DAV:}response/{DAV:}href</name>
+					<variable>$href2:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Remove notification</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>DELETEALL</method>
+				<ruri>$notificationpath2:/</ruri>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>new resource</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>REPORT</method>
+				<ruri>$notificationpath2:/</ruri>
+				<data substitutions='yes'>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/notification-sync/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>prefix</name>
+						<value/>
+					</arg>
+					<arg>
+						<name>badhrefs</name>
+						<value>$href2:</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>/{DAV:}multistatus/{DAV:}sync-token</name>
+					<variable>$synctoken2:</variable>
+				</grabelement>
+			</request>
+		</test>
+	</test-suite>
+
+	<end/>
+	
+</caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100923/130eae91/attachment.html>


More information about the calendarserver-changes mailing list