[CalendarServer-changes] [5318] CalDAVTester/branches/users/cdaboo/sharing-5228

source_changes at macosforge.org source_changes at macosforge.org
Tue Mar 16 13:08:01 PDT 2010


Revision: 5318
          http://trac.macosforge.org/projects/calendarserver/changeset/5318
Author:   cdaboo at apple.com
Date:     2010-03-16 13:08:00 -0700 (Tue, 16 Mar 2010)
Log Message:
-----------
Tests for read-write/read-only shared behaviors.

Modified Paths:
--------------
    CalDAVTester/branches/users/cdaboo/sharing-5228/scripts/tests/CalDAV/sharing-replies.xml

Added Paths:
-----------
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/1.xml
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/2.xml
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/3.xml
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/4.xml
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/5.ics
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/6.ics
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/1.xml
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/2.xml
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/3.xml
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/4.xml
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/5.ics
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/6.ics
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/7.ics
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/8.ics
    CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/7.xml
    CalDAVTester/branches/users/cdaboo/sharing-5228/scripts/tests/CalDAV/sharing-calendars.xml

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/1.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/1.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/1.xml	2010-03-16 20:08:00 UTC (rev 5318)
@@ -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>mailto:user02 at example.com</D:href>
+        <CS:summary>My Shared Calendar</CS:summary>
+        <CS:read/>
+    </CS:set>
+</CS:share>

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/2.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/2.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/2.xml	2010-03-16 20:08:00 UTC (rev 5318)
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='UTF-8'?><notification xmlns='http://calendarserver.org/ns/'>
+  <dtstamp></dtstamp>
+  <invite-notification shared-type='calendar'>
+    <uid></uid>
+    <href xmlns='DAV:'>/principals/__uids__/user02/</href>
+    <invite-accepted/>
+    <access>
+      <read/>
+    </access>
+    <hosturl>
+      <href xmlns='DAV:'>/calendars/__uids__/user01/shared</href>
+    </hosturl>
+    <organizer>
+      <href xmlns='DAV:'>/principals/__uids__/user01/</href>
+    </organizer>
+    <summary>My Shared Calendar</summary>
+  </invite-notification>
+</notification>

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/3.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/3.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/3.xml	2010-03-16 20:08:00 UTC (rev 5318)
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<invite-reply xmlns='http://calendarserver.org/ns/'>
+  <href xmlns='DAV:'>/principals/__uids__/user02/</href>
+  <invite-accepted/>
+  <hosturl>
+    <href xmlns='DAV:'>/calendars/__uids__/user01/shared</href>
+  </hosturl>
+  <in-reply-to>$inviteuid:</in-reply-to>
+  <summary>The Shared Calendar</summary>
+</invite-reply>

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/4.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/4.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/4.xml	2010-03-16 20:08:00 UTC (rev 5318)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:resourcetype/>
+<D:owner/>
+<D:current-user-privilege-set/>
+</D:prop>
+</D:propfind>

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/5.ics
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/5.ics	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/5.ics	2010-03-16 20:08:00 UTC (rev 5318)
@@ -0,0 +1,29 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//PYVOBJECT//NONSGML Version 1//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:54E181BC7CCC373042B28842-1 at ninevah.local
+DTSTART;TZID=US/Eastern:20060101T100000
+DURATION:PT1H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 1
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/6.ics
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/6.ics	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-only/6.ics	2010-03-16 20:08:00 UTC (rev 5318)
@@ -0,0 +1,29 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//PYVOBJECT//NONSGML Version 1//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:54E181BC7CCC373042B28842-6 at ninevah.local
+DTSTART;TZID=US/Eastern:20060101T100000
+DURATION:PT1H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 6
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/1.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/1.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/1.xml	2010-03-16 20:08:00 UTC (rev 5318)
@@ -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>mailto:user02 at example.com</D:href>
+        <CS:summary>My Shared Calendar</CS:summary>
+        <CS:read-write/>
+    </CS:set>
+</CS:share>

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/2.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/2.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/2.xml	2010-03-16 20:08:00 UTC (rev 5318)
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='UTF-8'?><notification xmlns='http://calendarserver.org/ns/'>
+  <dtstamp></dtstamp>
+  <invite-notification shared-type='calendar'>
+    <uid></uid>
+    <href xmlns='DAV:'>/principals/__uids__/user02/</href>
+    <invite-noresponse/>
+    <access>
+      <read-write/>
+    </access>
+    <hosturl>
+      <href xmlns='DAV:'>/calendars/__uids__/user01/shared</href>
+    </hosturl>
+    <organizer>
+      <href xmlns='DAV:'>/principals/__uids__/user01/</href>
+    </organizer>
+    <summary>My Shared Calendar</summary>
+  </invite-notification>
+</notification>

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/3.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/3.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/3.xml	2010-03-16 20:08:00 UTC (rev 5318)
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<invite-reply xmlns='http://calendarserver.org/ns/'>
+  <href xmlns='DAV:'>/principals/__uids__/user02/</href>
+  <invite-accepted/>
+  <hosturl>
+    <href xmlns='DAV:'>/calendars/__uids__/user01/shared</href>
+  </hosturl>
+  <in-reply-to>$inviteuid:</in-reply-to>
+  <summary>The Shared Calendar</summary>
+</invite-reply>

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/4.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/4.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/4.xml	2010-03-16 20:08:00 UTC (rev 5318)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:resourcetype/>
+<D:owner/>
+<D:current-user-privilege-set/>
+</D:prop>
+</D:propfind>

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/5.ics
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/5.ics	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/5.ics	2010-03-16 20:08:00 UTC (rev 5318)
@@ -0,0 +1,29 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//PYVOBJECT//NONSGML Version 1//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:54E181BC7CCC373042B28842-2 at ninevah.local
+DTSTART;TZID=US/Eastern:20060101T100000
+DURATION:PT1H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 1
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/6.ics
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/6.ics	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/6.ics	2010-03-16 20:08:00 UTC (rev 5318)
@@ -0,0 +1,29 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//PYVOBJECT//NONSGML Version 1//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:54E181BC7CCC373042B28842-2 at ninevah.local
+DTSTART;TZID=US/Eastern:20060101T100000
+DURATION:PT4H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 4
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/7.ics
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/7.ics	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/7.ics	2010-03-16 20:08:00 UTC (rev 5318)
@@ -0,0 +1,29 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//PYVOBJECT//NONSGML Version 1//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:54E181BC7CCC373042B28842-7 at ninevah.local
+DTSTART;TZID=US/Eastern:20060201T100000
+DURATION:PT1H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 7
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/8.ics
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/8.ics	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/calendars/read-write/8.ics	2010-03-16 20:08:00 UTC (rev 5318)
@@ -0,0 +1,29 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//PYVOBJECT//NONSGML Version 1//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:54E181BC7CCC373042B28842-7 at ninevah.local
+DTSTART;TZID=US/Eastern:20060201T100000
+DURATION:PT7H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 7-1
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/7.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/7.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/Resource/CalDAV/sharing/replies/accept/7.xml	2010-03-16 20:08:00 UTC (rev 5318)
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<shared-calendar xmlns='http://calendarserver.org/ns/'>
+  <href xmlns='DAV:'></href>
+</shared-calendar>

Added: CalDAVTester/branches/users/cdaboo/sharing-5228/scripts/tests/CalDAV/sharing-calendars.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/scripts/tests/CalDAV/sharing-calendars.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/scripts/tests/CalDAV/sharing-calendars.xml	2010-03-16 20:08:00 UTC (rev 5318)
@@ -0,0 +1,411 @@
+<?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>
+	</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>
+	</start>
+	
+	<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/calendars/read-write/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Check Sharee notification collection</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>GETNEW</method>
+				<ruri>$notificationpath2:/</ruri>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/calendars/read-write/2.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}dtstamp</value>
+						<value>{http://calendarserver.org/ns/}uid</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+					<variable>$inviteuid:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Sharee replies ACCEPTED</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>POST</method>
+				<ruri>$pathprefix2:/</ruri>
+				<data substitutions='yes'>
+					<content-type>application/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/calendars/read-write/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<grabelement>
+					<name>{DAV:}href</name>
+					<variable>$sharedcalendar:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='4'>
+			<description>Shared calendar exists</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$sharedcalendar:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/calendars/read-write/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>props</name>
+						<value>DAV:resourcetype$.*shared[^-].*</value>
+						<value><![CDATA[DAV:owner$<href>/principals/__uids__/user01/</href>]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<read/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<write/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<bind/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<unbind/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*admin.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*all.*]]></value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='5'>
+			<description>Sharee creates event</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PUT</method>
+				<ruri>$sharedcalendar:/1.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/calendars/read-write/5.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='6'>
+			<description>Sharer sees event</description>
+			<request print-response='no'>
+				<method>GET</method>
+				<ruri>$pathprefix1:/shared/1.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/calendars/read-write/5.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='7'>
+			<description>Sharer changes event</description>
+			<request print-response='no'>
+				<method>PUT</method>
+				<ruri>$pathprefix1:/shared/1.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/calendars/read-write/6.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='8'>
+			<description>Sharee sees changed event</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GET</method>
+				<ruri>$sharedcalendar:/1.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/calendars/read-write/6.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='9'>
+			<description>Sharer creates event</description>
+			<request print-response='no'>
+				<method>PUT</method>
+				<ruri>$pathprefix1:/shared/2.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/calendars/read-write/7.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='10'>
+			<description>Sharee sees new event</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GET</method>
+				<ruri>$sharedcalendar:/2.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/calendars/read-write/7.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='11'>
+			<description>Sharee changes event</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PUT</method>
+				<ruri>$sharedcalendar:/2.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/calendars/read-write/8.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='12'>
+			<description>Sharer sees changed event</description>
+			<request print-response='no'>
+				<method>GET</method>
+				<ruri>$pathprefix1:/shared/2.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/calendars/read-write/8.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<test-suite name='Change to read-only calendar' ignore='no'>
+		<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/calendars/read-only/1.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Check Sharee notification collection</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>GETNEW</method>
+				<ruri>$notificationpath2:/</ruri>
+				<verify>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/calendars/read-only/2.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{http://calendarserver.org/ns/}dtstamp</value>
+						<value>{http://calendarserver.org/ns/}uid</value>
+					</arg>
+				</verify>
+				<grabelement>
+					<name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+					<variable>$inviteuid:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Sharee replies ACCEPTED</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>POST</method>
+				<ruri>$pathprefix2:/</ruri>
+				<data substitutions='yes'>
+					<content-type>application/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/calendars/read-only/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+				<grabelement>
+					<name>{DAV:}href</name>
+					<variable>$sharedcalendar:</variable>
+				</grabelement>
+			</request>
+		</test>
+		<test name='4'>
+			<description>Shared calendar exists</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PROPFIND</method>
+				<ruri>$sharedcalendar:/</ruri>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/calendars/read-only/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>props</name>
+						<value>DAV:resourcetype$.*shared[^-].*</value>
+						<value><![CDATA[DAV:owner$<href>/principals/__uids__/user01/</href>]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<read/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*<write/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*<bind/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*<unbind/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*admin.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*all.*]]></value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='5'>
+			<description>Create event</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PUT</method>
+				<ruri>$sharedcalendar:/3.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/calendars/read-only/5.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>403</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='6'>
+			<description>Sharer creates event</description>
+			<request print-response='no'>
+				<method>PUT</method>
+				<ruri>$pathprefix1:/shared/4.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/calendars/read-only/6.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='7'>
+			<description>Sharee sees new event</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>GET</method>
+				<ruri>$sharedcalendar:/4.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/calendars/read-only/6.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='8'>
+			<description>Sharee canoot change event</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+				<method>PUT</method>
+				<ruri>$sharedcalendar:/4.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/calendars/read-write/8.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>403</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
+	<end/>
+	
+</caldavtest>

Modified: CalDAVTester/branches/users/cdaboo/sharing-5228/scripts/tests/CalDAV/sharing-replies.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/sharing-5228/scripts/tests/CalDAV/sharing-replies.xml	2010-03-16 20:07:16 UTC (rev 5317)
+++ CalDAVTester/branches/users/cdaboo/sharing-5228/scripts/tests/CalDAV/sharing-replies.xml	2010-03-16 20:08:00 UTC (rev 5318)
@@ -92,7 +92,7 @@
 		</test>
 		<test name='3'>
 			<description>Sharee replies ACCEPTED</description>
-			<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+			<request user="$userid2:" pswd="$pswd2:" print-response='yes'>
 				<method>POST</method>
 				<ruri>$pathprefix2:/</ruri>
 				<data substitutions='yes'>
@@ -100,7 +100,15 @@
 					<filepath>Resource/CalDAV/sharing/replies/accept/3.xml</filepath>
 				</data>
 				<verify>
-					<callback>statusCode</callback>
+					<callback>xmlDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/replies/accept/7.xml</value>
+					</arg>
+					<arg>
+						<name>filter</name>
+						<value>{DAV:}href</value>
+					</arg>
 				</verify>
 			</request>
 		</test>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100316/5671d750/attachment-0001.html>


More information about the calendarserver-changes mailing list