[CalendarServer-changes] [8538] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Mon Jan 16 08:51:07 PST 2012


Revision: 8538
          http://trac.macosforge.org/projects/calendarserver/changeset/8538
Author:   cdaboo at apple.com
Date:     2012-01-16 08:51:06 -0800 (Mon, 16 Jan 2012)
Log Message:
-----------
Test copy/move behavior to/from shared calendars.

Modified Paths:
--------------
    CalDAVTester/trunk/scripts/tests/CalDAV/privateevents.xml

Added Paths:
-----------
    CalDAVTester/trunk/Resource/CalDAV/sharing/moves/
    CalDAVTester/trunk/Resource/CalDAV/sharing/moves/1.ics
    CalDAVTester/trunk/Resource/CalDAV/sharing/moves/2.ics
    CalDAVTester/trunk/Resource/CalDAV/sharing/moves/3.ics
    CalDAVTester/trunk/Resource/CalDAV/sharing/moves/4.ics
    CalDAVTester/trunk/Resource/CalDAV/sharing/moves/5.ics
    CalDAVTester/trunk/Resource/CalDAV/sharing/moves/6.ics
    CalDAVTester/trunk/Resource/CalDAV/sharing/moves/7.ics
    CalDAVTester/trunk/Resource/CalDAV/sharing/moves/8.ics
    CalDAVTester/trunk/Resource/Common/POST/sharinginvite2.xml
    CalDAVTester/trunk/scripts/tests/CalDAV/sharing-moves.xml

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/moves/1.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/moves/1.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/moves/1.ics	2012-01-16 16:51:06 UTC (rev 8538)
@@ -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:user02-uid1
+DTSTART;TZID=US/Eastern:20060101T180000
+DURATION:PT1H
+DTSTAMP:20051222T210310Z
+SUMMARY:event 1
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/moves/2.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/moves/2.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/moves/2.ics	2012-01-16 16:51:06 UTC (rev 8538)
@@ -0,0 +1,30 @@
+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:user02-uid2
+DTSTART;TZID=US/Eastern:20060101T180000
+DURATION:PT1H
+DTSTAMP:20051222T210310Z
+SUMMARY:event 2
+ORGANIZER:$cuaddr2:
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/moves/3.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/moves/3.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/moves/3.ics	2012-01-16 16:51:06 UTC (rev 8538)
@@ -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:user01-uid3
+DTSTART;TZID=US/Eastern:20060101T180000
+DURATION:PT1H
+DTSTAMP:20051222T210310Z
+SUMMARY:event 3
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/moves/4.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/moves/4.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/moves/4.ics	2012-01-16 16:51:06 UTC (rev 8538)
@@ -0,0 +1,30 @@
+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:user02-uid2
+DTSTART;TZID=US/Eastern:20060101T180000
+DURATION:PT1H
+DTSTAMP:20051222T210310Z
+SUMMARY:event 2
+ORGANIZER:$cuaddr2:
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/moves/5.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/moves/5.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/moves/5.ics	2012-01-16 16:51:06 UTC (rev 8538)
@@ -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:user01-uid5
+DTSTART;TZID=US/Eastern:20060101T180000
+DURATION:PT1H
+DTSTAMP:20051222T210310Z
+SUMMARY:event 5
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/moves/6.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/moves/6.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/moves/6.ics	2012-01-16 16:51:06 UTC (rev 8538)
@@ -0,0 +1,30 @@
+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:user01-uid6
+DTSTART;TZID=US/Eastern:20060101T180000
+DURATION:PT1H
+DTSTAMP:20051222T210310Z
+SUMMARY:event 6
+ORGANIZER;CN=$username1:;EMAIL=$email1::$cuaddrurn1:
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/moves/7.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/moves/7.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/moves/7.ics	2012-01-16 16:51:06 UTC (rev 8538)
@@ -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:user01-uid7
+DTSTART;TZID=US/Eastern:20060101T180000
+DURATION:PT1H
+DTSTAMP:20051222T210310Z
+SUMMARY:event 7
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/moves/8.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/moves/8.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/moves/8.ics	2012-01-16 16:51:06 UTC (rev 8538)
@@ -0,0 +1,30 @@
+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:user01-uid8
+DTSTART;TZID=US/Eastern:20060101T180000
+DURATION:PT1H
+DTSTAMP:20051222T210310Z
+SUMMARY:event 8
+ORGANIZER;CN=$username1:;EMAIL=$email1::$cuaddrurn1:
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/Common/POST/sharinginvite2.xml
===================================================================
--- CalDAVTester/trunk/Resource/Common/POST/sharinginvite2.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/Common/POST/sharinginvite2.xml	2012-01-16 16:51:06 UTC (rev 8538)
@@ -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>

Modified: CalDAVTester/trunk/scripts/tests/CalDAV/privateevents.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/privateevents.xml	2012-01-14 00:02:19 UTC (rev 8537)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/privateevents.xml	2012-01-16 16:51:06 UTC (rev 8538)
@@ -3,7 +3,7 @@
 <!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
 
 <!--
- Copyright (c) 2006-2010 Apple Inc. All rights reserved.
+ Copyright (c) 2006-2012 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.
@@ -3171,7 +3171,7 @@
 				<ruri>$calendarhome1:/fromcalendar/1.ics</ruri>
 				<header>
 					<name>Destination</name>
-					<value>$host:/$calendarhome1:/copycalendar/1.ics</value>
+					<value>$host:$calendarhome1:/copycalendar/1.ics</value>
 				</header>
 				<verify>
 					<callback>statusCode</callback>
@@ -3185,7 +3185,7 @@
 				<ruri>$calendarhome1:/fromcalendar/2.ics</ruri>
 				<header>
 					<name>Destination</name>
-					<value>$host:/$calendarhome1:/copycalendar/2.ics</value>
+					<value>$host:$calendarhome1:/copycalendar/2.ics</value>
 				</header>
 				<verify>
 					<callback>statusCode</callback>
@@ -3199,7 +3199,7 @@
 				<ruri>$calendarhome1:/fromcalendar/3.ics</ruri>
 				<header>
 					<name>Destination</name>
-					<value>$host:/$calendarhome1:/copycalendar/3.ics</value>
+					<value>$host:$calendarhome1:/copycalendar/3.ics</value>
 				</header>
 				<verify>
 					<callback>statusCode</callback>
@@ -3213,7 +3213,7 @@
 				<ruri>$calendarhome1:/fromcalendar/4.ics</ruri>
 				<header>
 					<name>Destination</name>
-					<value>$host:/$calendarhome1:/copycalendar/4.ics</value>
+					<value>$host:$calendarhome1:/copycalendar/4.ics</value>
 				</header>
 				<verify>
 					<callback>statusCode</callback>
@@ -3227,7 +3227,7 @@
 				<ruri>$calendarhome1:/fromcalendar/5.ics</ruri>
 				<header>
 					<name>Destination</name>
-					<value>$host:/$calendarhome1:/copycalendar/5.ics</value>
+					<value>$host:$calendarhome1:/copycalendar/5.ics</value>
 				</header>
 				<verify>
 					<callback>statusCode</callback>
@@ -3577,7 +3577,7 @@
 				<ruri>$calendarhome1:/fromcalendar/1.ics</ruri>
 				<header>
 					<name>Destination</name>
-					<value>$host:/$calendarhome1:/movecalendar/1.ics</value>
+					<value>$host:$calendarhome1:/movecalendar/1.ics</value>
 				</header>
 				<verify>
 					<callback>statusCode</callback>
@@ -3591,7 +3591,7 @@
 				<ruri>$calendarhome1:/fromcalendar/2.ics</ruri>
 				<header>
 					<name>Destination</name>
-					<value>$host:/$calendarhome1:/movecalendar/2.ics</value>
+					<value>$host:$calendarhome1:/movecalendar/2.ics</value>
 				</header>
 				<verify>
 					<callback>statusCode</callback>
@@ -3605,7 +3605,7 @@
 				<ruri>$calendarhome1:/fromcalendar/3.ics</ruri>
 				<header>
 					<name>Destination</name>
-					<value>$host:/$calendarhome1:/movecalendar/3.ics</value>
+					<value>$host:$calendarhome1:/movecalendar/3.ics</value>
 				</header>
 				<verify>
 					<callback>statusCode</callback>
@@ -3619,7 +3619,7 @@
 				<ruri>$calendarhome1:/fromcalendar/4.ics</ruri>
 				<header>
 					<name>Destination</name>
-					<value>$host:/$calendarhome1:/movecalendar/4.ics</value>
+					<value>$host:$calendarhome1:/movecalendar/4.ics</value>
 				</header>
 				<verify>
 					<callback>statusCode</callback>
@@ -3633,7 +3633,7 @@
 				<ruri>$calendarhome1:/fromcalendar/5.ics</ruri>
 				<header>
 					<name>Destination</name>
-					<value>$host:/$calendarhome1:/movecalendar/5.ics</value>
+					<value>$host:$calendarhome1:/movecalendar/5.ics</value>
 				</header>
 				<verify>
 					<callback>statusCode</callback>

Added: CalDAVTester/trunk/scripts/tests/CalDAV/sharing-moves.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/sharing-moves.xml	                        (rev 0)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/sharing-moves.xml	2012-01-16 16:51:06 UTC (rev 8538)
@@ -0,0 +1,546 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2012 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 ignore-all='no'>
+	<description>Test calendar sharing and MOVE</description>
+
+	<require-feature>
+		<feature>caldav</feature>
+		<feature>shared-calendars</feature>
+	</require-feature>
+
+	<start>
+		<request end-delete="yes">
+			<method>MKCALENDAR</method>
+			<ruri>$calendarhome1:/shared/</ruri>
+			<data>
+				<content-type>text/xml; charset=utf-8</content-type>
+				<filepath>Resource/Common/MKCALENDAR/sharedcalendar.xml</filepath>
+			</data>
+		</request>
+		<request print-response='no'>
+			<method>POST</method>
+			<ruri>$calendarhome1:/shared/</ruri>
+			<data>
+				<content-type>text/xml; charset=utf-8</content-type>
+				<filepath>Resource/Common/POST/sharinginvite2.xml</filepath>
+			</data>
+			<verify>
+				<callback>statusCode</callback>
+			</verify>
+		</request>
+		<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>
+			<grabelement>
+				<name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+				<variable>$inviteuid2:</variable>
+			</grabelement>
+		</request>
+		<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+			<method>POST</method>
+			<ruri>$calendarhome2:/</ruri>
+			<data substitutions='yes'>
+				<content-type>application/xml; charset=utf-8</content-type>
+				<filepath>Resource/Common/POST/sharingreply2.xml</filepath>
+			</data>
+			<grabelement>
+				<name>{DAV:}href</name>
+				<variable>$sharedcalendar2:</variable>
+			</grabelement>
+		</request>
+	</start>
+	
+	<test-suite name='OK event to shared calendar' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>User02 store to personal calendar</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>PUT</method>
+				<ruri>$calendarpath2:/1.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/moves/1.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>User02 moves event to shared calendar</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>MOVE</method>
+				<ruri>$calendarpath2:/1.ics</ruri>
+				<header>
+					<name>Destination</name>
+					<value>$host:$sharedcalendar2:/1.ics</value>
+				</header>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='3' ignore='no'>
+			<description>User02 sees event</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>GET</method>
+				<ruri>$sharedcalendar2:/1.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/moves/1.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>User01 sees event</description>
+			<request print-response="no">
+				<method>GET</method>
+				<ruri>$calendarhome1:/shared/1.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/moves/1.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	
+	<test-suite name='Bad event to shared calendar' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>User02 store to personal calendar</description>
+			<request user="$userid2:" pswd="$pswd2:" end-delete="yes" print-response="no">
+				<method>PUT</method>
+				<ruri>$calendarpath2:/2.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/moves/2.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>User02 moves event to shared calendar</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>MOVE</method>
+				<ruri>$calendarpath2:/2.ics</ruri>
+				<header>
+					<name>Destination</name>
+					<value>$host:$sharedcalendar2:/2.ics</value>
+				</header>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>403</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<test-suite name='OK event from shared calendar' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>User01 store to shared calendar</description>
+			<request print-response="no">
+				<method>PUT</method>
+				<ruri>$calendarhome1:/shared/3.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/moves/3.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>User02 moves event from shared calendar</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>MOVE</method>
+				<ruri>$sharedcalendar2:/3.ics</ruri>
+				<header>
+					<name>Destination</name>
+					<value>$host:$calendarpath2:/3.ics</value>
+				</header>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='3' ignore='no'>
+			<description>User02 sees event</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>GET</method>
+				<ruri>$calendarpath2:/3.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/moves/3.ics</value>
+					</arg>
+				</verify>
+			</request>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>DELETE</method>
+				<ruri>$calendarpath2:/3.ics</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>User01 sees no event</description>
+			<request print-response="no">
+				<method>GET</method>
+				<ruri>$calendarhome1:/shared/3.ics</ruri>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>404</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	
+	<test-suite name='Bad event to shared calendar' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>User01 store to shared calendar</description>
+			<request end-delete="yes" print-response="no">
+				<method>PUT</method>
+				<ruri>$calendarhome1:/shared/4.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/moves/4.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>User02 moves event from shared calendar</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>MOVE</method>
+				<ruri>$sharedcalendar2:/4.ics</ruri>
+				<header>
+					<name>Destination</name>
+					<value>$host:$calendarpath2:/4.ics</value>
+				</header>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>403</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<test-suite name='OK owner event to shared calendar' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>User01 store to personal calendar</description>
+			<request print-response="no">
+				<method>PUT</method>
+				<ruri>$calendarpath1:/5.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/moves/5.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>User01 moves event to shared calendar</description>
+			<request print-response="no">
+				<method>MOVE</method>
+				<ruri>$calendarpath1:/5.ics</ruri>
+				<header>
+					<name>Destination</name>
+					<value>$host:$calendarhome1:/shared/5.ics</value>
+				</header>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='3' ignore='no'>
+			<description>User02 sees event</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>GET</method>
+				<ruri>$sharedcalendar2:/5.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/moves/5.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>User01 sees event</description>
+			<request print-response="no">
+				<method>GET</method>
+				<ruri>$calendarhome1:/shared/5.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/moves/5.ics</value>
+					</arg>
+				</verify>
+			</request>
+			<request print-response="no">
+				<method>DELETE</method>
+				<ruri>$calendarhome1:/shared/5.ics</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	
+	<test-suite name='OK owner event with organizer to shared calendar' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>User01 store to personal calendar</description>
+			<request print-response="no">
+				<method>PUT</method>
+				<ruri>$calendarpath1:/6.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/moves/6.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>User01 moves event to shared calendar</description>
+			<request print-response="no">
+				<method>MOVE</method>
+				<ruri>$calendarpath1:/6.ics</ruri>
+				<header>
+					<name>Destination</name>
+					<value>$host:$calendarhome1:/shared/6.ics</value>
+				</header>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='3' ignore='no'>
+			<description>User02 sees event</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>GET</method>
+				<ruri>$sharedcalendar2:/6.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/moves/6.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>User01 sees event</description>
+			<request print-response="no">
+				<method>GET</method>
+				<ruri>$calendarhome1:/shared/6.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/moves/6.ics</value>
+					</arg>
+				</verify>
+			</request>
+			<request print-response="no">
+				<method>DELETE</method>
+				<ruri>$calendarhome1:/shared/6.ics</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<test-suite name='OK owner event from shared calendar' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>User01 store to shared calendar</description>
+			<request print-response="no">
+				<method>PUT</method>
+				<ruri>$calendarhome1:/shared/7.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/moves/7.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>User01 moves event from shared calendar</description>
+			<request print-response="no">
+				<method>MOVE</method>
+				<ruri>$calendarhome1:/shared/7.ics</ruri>
+				<header>
+					<name>Destination</name>
+					<value>$host:$calendarpath1:/7.ics</value>
+				</header>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='3' ignore='no'>
+			<description>User02 does not see event</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>GET</method>
+				<ruri>$sharedcalendar2:/7.ics</ruri>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>404</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>User01 sees event</description>
+			<request print-response="no">
+				<method>GET</method>
+				<ruri>$calendarpath1:/7.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/moves/7.ics</value>
+					</arg>
+				</verify>
+			</request>
+			<request print-response="no">
+				<method>DELETE</method>
+				<ruri>$calendarpath1:/7.ics</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	
+	<test-suite name='OK owner event with organizer from shared calendar' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>User01 store to shared calendar</description>
+			<request print-response="no">
+				<method>PUT</method>
+				<ruri>$calendarhome1:/shared/8.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/moves/8.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>User01 moves event from shared calendar</description>
+			<request print-response="no">
+				<method>MOVE</method>
+				<ruri>$calendarhome1:/shared/8.ics</ruri>
+				<header>
+					<name>Destination</name>
+					<value>$host:$calendarpath1:/8.ics</value>
+				</header>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='3' ignore='no'>
+			<description>User02 does not see event</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>GET</method>
+				<ruri>$sharedcalendar2:/8.ics</ruri>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>404</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>User01 sees event</description>
+			<request print-response="no">
+				<method>GET</method>
+				<ruri>$calendarpath1:/8.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/CalDAV/sharing/moves/8.ics</value>
+					</arg>
+				</verify>
+			</request>
+			<request print-response="no">
+				<method>DELETE</method>
+				<ruri>$calendarpath1:/8.ics</ruri>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<end>
+		<request user="$useradmin:" pswd="$pswdadmin:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath1:/</ruri>
+			<ruri>$notificationpath2:/</ruri>
+		</request>
+	</end>
+
+</caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120116/46793ea1/attachment-0001.html>


More information about the calendarserver-changes mailing list