[CalendarServer-changes] [7027] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Wed Feb 16 11:44:29 PST 2011


Revision: 7027
          http://trac.macosforge.org/projects/calendarserver/changeset/7027
Author:   cdaboo at apple.com
Date:     2011-02-16 11:44:29 -0800 (Wed, 16 Feb 2011)
Log Message:
-----------
Test sharing and freebusy interaction (with the new freebusy cache).

Added Paths:
-----------
    CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/
    CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/1.ics
    CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/2.ics
    CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/3.ics
    CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/4.ics
    CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/5.ics
    CalDAVTester/trunk/scripts/tests/CalDAV/sharing-freebusy.xml

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/1.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/1.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/1.ics	2011-02-16 19:44:29 UTC (rev 7027)
@@ -0,0 +1,33 @@
+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-uid
+DTSTART;TZID=US/Eastern:$now.0:T180000
+DURATION:PT1H
+DTSTAMP:20051222T210310Z
+SUMMARY:event 1
+BEGIN:VALARM
+ACTION:AUDIO
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/2.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/2.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/2.ics	2011-02-16 19:44:29 UTC (rev 7027)
@@ -0,0 +1,34 @@
+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-uid
+DTSTART;TZID=US/Eastern:$now.1:T180000
+DURATION:PT1H
+DTSTAMP:20051222T210310Z
+SUMMARY:event 1.2
+TRANSP:TRANSPARENT
+BEGIN:VALARM
+ACTION:AUDIO
+TRIGGER;RELATED=START:-PT15M
+END:VALARM
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/3.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/3.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/3.ics	2011-02-16 19:44:29 UTC (rev 7027)
@@ -0,0 +1,16 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Example Inc.//Example Calendar//EN
+VERSION:2.0
+METHOD:REQUEST
+BEGIN:VFREEBUSY
+UID:20060110T231240Z-4011c71-187-6f73-fb
+ORGANIZER;CN=$username1::$cuaddr1:
+ATTENDEE;CN=$username1::$cuaddr1:
+ATTENDEE;CN=$username2::$cuaddr2:
+ATTENDEE;CN=$username3::$cuaddr3:
+DTSTART:$now.0:T000000Z
+DTSTAMP:20060309T185105Z
+DTEND:$now.4:T000000Z
+END:VFREEBUSY
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/4.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/4.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/4.ics	2011-02-16 19:44:29 UTC (rev 7027)
@@ -0,0 +1,16 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Example Inc.//Example Calendar//EN
+VERSION:2.0
+METHOD:REQUEST
+BEGIN:VFREEBUSY
+UID:20060110T231240Z-4011c71-187-6f73-fb
+ORGANIZER;CN=$username2::$cuaddr2:
+ATTENDEE;CN=$username1::$cuaddr1:
+ATTENDEE;CN=$username2::$cuaddr2:
+ATTENDEE;CN=$username3::$cuaddr3:
+DTSTART:$now.0:T000000Z
+DTSTAMP:20060309T185105Z
+DTEND:$now.4:T000000Z
+END:VFREEBUSY
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/5.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/5.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/freebusy/5.ics	2011-02-16 19:44:29 UTC (rev 7027)
@@ -0,0 +1,16 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Example Inc.//Example Calendar//EN
+VERSION:2.0
+METHOD:REQUEST
+BEGIN:VFREEBUSY
+UID:20060110T231240Z-4011c71-187-6f73-fb
+ORGANIZER;CN=$username3::$cuaddr3:
+ATTENDEE;CN=$username1::$cuaddr1:
+ATTENDEE;CN=$username2::$cuaddr2:
+ATTENDEE;CN=$username3::$cuaddr3:
+DTSTART:$now.0:T000000Z
+DTSTAMP:20060309T185105Z
+DTEND:$now.4:T000000Z
+END:VFREEBUSY
+END:VCALENDAR

Added: CalDAVTester/trunk/scripts/tests/CalDAV/sharing-freebusy.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/sharing-freebusy.xml	                        (rev 0)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/sharing-freebusy.xml	2011-02-16 19:44:29 UTC (rev 7027)
@@ -0,0 +1,413 @@
+<?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 ignore-all='no'>
+	<description>Test calendar sharing per-user data</description>
+
+	<require-feature>
+		<feature>caldav</feature>
+		<feature>shared-calendars</feature>
+	</require-feature>
+
+	<start>
+		<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>
+		</request>
+		<request print-response='no'>
+			<method>POST</method>
+			<ruri>$pathprefix1:/shared/</ruri>
+			<data>
+				<content-type>text/xml; charset=utf-8</content-type>
+				<filepath>Resource/Common/POST/sharinginvite23.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>$pathprefix2:/</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>
+		<request user="$userid3:" pswd="$pswd3:" print-response='no'>
+			<method>WAITCOUNT 1</method>
+			<ruri>$notificationpath3:/</ruri>
+		</request>
+		<request user="$userid3:" pswd="$pswd3:" print-response='no'>
+			<method>GETNEW</method>
+			<ruri>$notificationpath3:/</ruri>
+			<grabelement>
+				<name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+				<variable>$inviteuid3:</variable>
+			</grabelement>
+		</request>
+		<request user="$userid3:" pswd="$pswd3:" print-response='no'>
+			<method>POST</method>
+			<ruri>$pathprefix3:/</ruri>
+			<data substitutions='yes'>
+				<content-type>application/xml; charset=utf-8</content-type>
+				<filepath>Resource/Common/POST/sharingreply3.xml</filepath>
+			</data>
+			<grabelement>
+				<name>{DAV:}href</name>
+				<variable>$sharedcalendar3:</variable>
+			</grabelement>
+		</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>
+		<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+			<method>PROPPATCH</method>
+			<ruri>$sharedcalendar2:/</ruri>
+			<data>
+				<content-type>text/xml; charset=utf-8</content-type>
+				<filepath>Resource/Common/PROPPATCH/calendar-transp-opaque.xml</filepath>
+			</data>
+		</request>
+		<request user="$userid3:" pswd="$pswd3:" print-response='no'>
+			<method>PROPPATCH</method>
+			<ruri>$sharedcalendar3:/</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='Initial event' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>User01 store to shared</description>
+			<request user="$userid1:" pswd="$pswd1:" print-response="no">
+				<method>PUT</method>
+				<ruri>$pathprefix1:/shared/1.ics</ruri>
+				<data substitutions='yes'>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/freebusy/1.ics</filepath>
+				</data>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>User01 freebusy</description>
+			<request print-response='no'>
+				<method>POST</method>
+				<ruri>$outboxpath1:/</ruri>
+				<data substitutions='yes'>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/freebusy/3.ics</filepath>
+				</data>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr1:</value>
+					</arg>
+					<arg>
+						<name>busy</name>
+						<value>$now.0:T230000Z/$now.1:T000000Z</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr2:</value>
+					</arg>
+					<arg>
+						<name>busy</name>
+						<value>$now.0:T230000Z/$now.1:T000000Z</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr3:</value>
+					</arg>
+					<arg>
+						<name>busy</name>
+						<value>$now.0:T230000Z/$now.1:T000000Z</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3' ignore='no'>
+			<description>User02 freebusy</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>POST</method>
+				<ruri>$outboxpath2:/</ruri>
+				<data substitutions='yes'>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/freebusy/4.ics</filepath>
+				</data>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr1:</value>
+					</arg>
+					<arg>
+						<name>busy</name>
+						<value>$now.0:T230000Z/$now.1:T000000Z</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr2:</value>
+					</arg>
+					<arg>
+						<name>busy</name>
+						<value>$now.0:T230000Z/$now.1:T000000Z</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr3:</value>
+					</arg>
+					<arg>
+						<name>busy</name>
+						<value>$now.0:T230000Z/$now.1:T000000Z</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>User03 freebusy</description>
+			<request user="$userid3:" pswd="$pswd3:" print-response="no">
+				<method>POST</method>
+				<ruri>$outboxpath3:/</ruri>
+				<data substitutions='yes'>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/freebusy/5.ics</filepath>
+				</data>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr1:</value>
+					</arg>
+					<arg>
+						<name>busy</name>
+						<value>$now.0:T230000Z/$now.1:T000000Z</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr2:</value>
+					</arg>
+					<arg>
+						<name>busy</name>
+						<value>$now.0:T230000Z/$now.1:T000000Z</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr3:</value>
+					</arg>
+					<arg>
+						<name>busy</name>
+						<value>$now.0:T230000Z/$now.1:T000000Z</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<test-suite name='Changed event' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>User02 store to shared</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>PUT</method>
+				<ruri>$sharedcalendar2:/1.ics</ruri>
+				<data substitutions='yes'>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/freebusy/2.ics</filepath>
+				</data>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>User01 freebusy</description>
+			<request print-response='no'>
+				<method>POST</method>
+				<ruri>$outboxpath1:/</ruri>
+				<data substitutions='yes'>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/freebusy/3.ics</filepath>
+				</data>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr1:</value>
+					</arg>
+					<arg>
+						<name>busy</name>
+						<value>$now.1:T230000Z/$now.2:T000000Z</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr2:</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr3:</value>
+					</arg>
+					<arg>
+						<name>busy</name>
+						<value>$now.1:T230000Z/$now.2:T000000Z</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3' ignore='no'>
+			<description>User02 freebusy</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>POST</method>
+				<ruri>$outboxpath2:/</ruri>
+				<data substitutions='yes'>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/freebusy/4.ics</filepath>
+				</data>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr1:</value>
+					</arg>
+					<arg>
+						<name>busy</name>
+						<value>$now.1:T230000Z/$now.2:T000000Z</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr2:</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr3:</value>
+					</arg>
+					<arg>
+						<name>busy</name>
+						<value>$now.1:T230000Z/$now.2:T000000Z</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4' ignore='no'>
+			<description>User03 freebusy</description>
+			<request user="$userid3:" pswd="$pswd3:" print-response="no">
+				<method>POST</method>
+				<ruri>$outboxpath3:/</ruri>
+				<data substitutions='yes'>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/freebusy/5.ics</filepath>
+				</data>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr1:</value>
+					</arg>
+					<arg>
+						<name>busy</name>
+						<value>$now.1:T230000Z/$now.2:T000000Z</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr2:</value>
+					</arg>
+				</verify>
+				<verify>
+					<callback>postFreeBusy</callback>
+					<arg>
+						<name>attendee</name>
+						<value>$cuaddr3:</value>
+					</arg>
+					<arg>
+						<name>busy</name>
+						<value>$now.1:T230000Z/$now.2:T000000Z</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<end>
+		<request user="$useradmin:" pswd="$pswdadmin:">
+			<method>DELETEALL</method>
+			<ruri>$notificationpath1:/</ruri>
+			<ruri>$notificationpath2:/</ruri>
+			<ruri>$notificationpath3:/</ruri>
+			<ruri>$notificationpath4:/</ruri>
+		</request>
+	</end>
+
+</caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110216/717596c2/attachment-0001.html>


More information about the calendarserver-changes mailing list