[CalendarServer-changes] [2059] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Tue Dec 11 07:51:35 PST 2007


Revision: 2059
          http://trac.macosforge.org/projects/calendarserver/changeset/2059
Author:   cdaboo at apple.com
Date:     2007-12-11 07:51:33 -0800 (Tue, 11 Dec 2007)

Log Message:
-----------
Test to make sure cached timezones are properly used.

Added Paths:
-----------
    CalDAVTester/trunk/Resource/timezones/
    CalDAVTester/trunk/Resource/timezones/1.ics
    CalDAVTester/trunk/Resource/timezones/2.xml
    CalDAVTester/trunk/Resource/timezones/3.ics
    CalDAVTester/trunk/scripts/tests/timezones.xml

Added: CalDAVTester/trunk/Resource/timezones/1.ics
===================================================================
--- CalDAVTester/trunk/Resource/timezones/1.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/timezones/1.ics	2007-12-11 15:51:33 UTC (rev 2059)
@@ -0,0 +1,36 @@
+BEGIN:VCALENDAR
+X-WR-TIMEZONE:America/New_York
+PRODID:-//Apple Inc.//iCal 3.0//EN
+CALSCALE:GREGORIAN
+X-WR-CALNAME:Home
+VERSION:2.0
+X-WR-RELCALID:5563B5BF-CBFE-4265-9D84-07C578472966
+X-APPLE-CALENDAR-COLOR:#2CA10B
+BEGIN:VTIMEZONE
+TZID:America/St_Johns
+BEGIN:STANDARD
+TZOFFSETFROM:-0230
+TZOFFSETTO:-0330
+DTSTART:19891029T000100
+RRULE:FREQ=YEARLY;UNTIL=20061029T023100Z;BYMONTH=10;BYDAY=-1SU
+TZNAME:NST
+END:STANDARD
+BEGIN:DAYLIGHT
+TZOFFSETFROM:-0330
+TZOFFSETTO:-0230
+DTSTART:20070311T000100
+RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
+TZNAME:NDT
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+SEQUENCE:4
+TRANSP:OPAQUE
+UID:B2695B03-1427-4B6A-9AC7-E9DB2A0C0DE8
+DTSTART;TZID=America/St_Johns:20070401T120000
+DTSTAMP:20071211T151055Z
+SUMMARY:April 1
+CREATED:20071211T151024Z
+DTEND;TZID=America/St_Johns:20070401T130000
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/timezones/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/timezones/2.xml	                        (rev 0)
+++ CalDAVTester/trunk/Resource/timezones/2.xml	2007-12-11 15:51:33 UTC (rev 2059)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<C:free-busy-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<C:time-range start="20070101T000000Z" end="20080101T000000Z"/>
+</C:free-busy-query>

Added: CalDAVTester/trunk/Resource/timezones/3.ics
===================================================================
--- CalDAVTester/trunk/Resource/timezones/3.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/timezones/3.ics	2007-12-11 15:51:33 UTC (rev 2059)
@@ -0,0 +1,36 @@
+BEGIN:VCALENDAR
+X-WR-TIMEZONE:America/New_York
+PRODID:-//Apple Inc.//iCal 3.0//EN
+CALSCALE:GREGORIAN
+X-WR-CALNAME:Work
+VERSION:2.0
+X-WR-RELCALID:ABF1B16F-02D9-4116-A5FF-5B648D76A4E3
+X-APPLE-CALENDAR-COLOR:#2CA10B
+BEGIN:VTIMEZONE
+TZID:America/St_Johns
+BEGIN:DAYLIGHT
+TZOFFSETFROM:-0330
+TZOFFSETTO:-0230
+DTSTART:20070311T000100
+RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
+TZNAME:NDT
+END:DAYLIGHT
+BEGIN:STANDARD
+TZOFFSETFROM:-0230
+TZOFFSETTO:-0330
+DTSTART:20071104T000100
+RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
+TZNAME:NST
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+SEQUENCE:9
+TRANSP:OPAQUE
+UID:F756C5EB-2D97-41AA-8E70-31AC0C0217DB
+DTSTART;TZID=America/St_Johns:20071210T120000
+DTSTAMP:20071211T151126Z
+SUMMARY:December 10 2007
+CREATED:20071210T202739Z
+DTEND;TZID=America/St_Johns:20071210T130000
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/scripts/tests/timezones.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/timezones.xml	                        (rev 0)
+++ CalDAVTester/trunk/scripts/tests/timezones.xml	2007-12-11 15:51:33 UTC (rev 2059)
@@ -0,0 +1,96 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2007 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.
+
+ DRI: Cyrus Daboo, cdaboo at apple.com
+ -->
+
+<caldavtest>
+	<description>Test timezone cache</description>
+
+	<start/>
+	
+	<test-suite name='Timezone cache'>
+		<test name='1'>
+			<description>PUT event with truncated timezone in April</description>
+			<request end-delete='yes'>
+				<method>PUT</method>
+				<ruri>1.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/timezones/1.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>query for free busy with time range</description>
+			<request print-response='no'>
+				<method>REPORT</method>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/timezones/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>freeBusy</callback>
+					<arg>
+						<name>busy</name>
+						<value>20070401T143000Z/20070401T153000Z</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>PUT event with truncated timezone in December</description>
+			<request end-delete='yes'>
+				<method>PUT</method>
+				<ruri>3.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/timezones/3.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='4'>
+			<description>query for free busy with time range</description>
+			<request print-response='no'>
+				<method>REPORT</method>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/timezones/2.xml</filepath>
+				</data>
+				<verify>
+					<callback>freeBusy</callback>
+					<arg>
+						<name>busy</name>
+						<value>20070401T143000Z/20070401T153000Z</value>
+						<value>20071210T153000Z/20071210T163000Z</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/20071211/fb8668b0/attachment.html


More information about the calendarserver-changes mailing list