[CalendarServer-changes] [14668] CalDAVTester/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Thu Apr 9 09:55:50 PDT 2015
Revision: 14668
http://trac.calendarserver.org//changeset/14668
Author: cdaboo at apple.com
Date: 2015-04-09 09:55:50 -0700 (Thu, 09 Apr 2015)
Log Message:
-----------
Tests for timezones-by-reference timezone-id properties.
Modified Paths:
--------------
CalDAVTester/trunk/scripts/tests/CalDAV/errors.xml
CalDAVTester/trunk/scripts/tests/CalDAV/reports.xml
CalDAVTester/trunk/scripts/tests/CalDAV/timezones.xml
Added Paths:
-----------
CalDAVTester/trunk/Resource/CalDAV/errors/50.xml
CalDAVTester/trunk/Resource/CalDAV/errors/51.xml
CalDAVTester/trunk/Resource/CalDAV/reports/limitexpand/14.xml
CalDAVTester/trunk/Resource/CalDAV/reports/timerangequery/105.xml
CalDAVTester/trunk/Resource/CalDAV/timezones/properties/
CalDAVTester/trunk/Resource/CalDAV/timezones/properties/1.xml
CalDAVTester/trunk/Resource/CalDAV/timezones/properties/2.xml
CalDAVTester/trunk/Resource/CalDAV/timezones/properties/3.xml
CalDAVTester/trunk/Resource/CalDAV/timezones/properties/4.xml
CalDAVTester/trunk/Resource/CalDAV/timezones/properties/5.xml
Added: CalDAVTester/trunk/Resource/CalDAV/errors/50.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/errors/50.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/errors/50.xml 2015-04-09 16:55:50 UTC (rev 14668)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:prop>
+<D:getetag/>
+<C:calendar-data/>
+</D:prop>
+<C:filter>
+<C:comp-filter name="VCALENDAR">
+<C:comp-filter name="VEVENT">
+<C:time-range start="20060101T050000Z" end="20060102T050000Z"/>
+</C:comp-filter>
+</C:comp-filter>
+</C:filter>
+<C:timezone-id>bogus</C:timezone-id>
+</C:calendar-query>
Added: CalDAVTester/trunk/Resource/CalDAV/errors/51.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/errors/51.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/errors/51.xml 2015-04-09 16:55:50 UTC (rev 14668)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:set>
+<D:prop>
+<C:calendar-timezone-id>bogus</C:calendar-timezone-id>
+</D:prop>
+</D:set>
+</D:propertyupdate>
\ No newline at end of file
Added: CalDAVTester/trunk/Resource/CalDAV/reports/limitexpand/14.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/reports/limitexpand/14.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/reports/limitexpand/14.xml 2015-04-09 16:55:50 UTC (rev 14668)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav">
+ <D:prop xmlns:D="DAV:">
+ <C:calendar-data>
+ <C:comp name="VCALENDAR"/>
+ <C:expand end="$now.year.2:1018T070000Z" start="$now.year.2:1018T060000Z"/>
+ </C:calendar-data>
+ </D:prop>
+ <C:filter>
+ <C:comp-filter name="VCALENDAR">
+ <C:comp-filter name="VEVENT">
+ <C:time-range end="$now.year.2:1024T060000Z" start="$now.year.2:1018T060000Z"/>
+ </C:comp-filter>
+ </C:comp-filter>
+ </C:filter>
+ <C:timezone-id>America/Los_Angeles</C:timezone-id>
+</C:calendar-query>
Added: CalDAVTester/trunk/Resource/CalDAV/reports/timerangequery/105.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/reports/timerangequery/105.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/reports/timerangequery/105.xml 2015-04-09 16:55:50 UTC (rev 14668)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav">
+ <D:prop xmlns:D="DAV:">
+ <C:calendar-data>
+ <C:comp name="VCALENDAR"/>
+ <C:expand end="$now.year.2:1023T065959Z" start="$now.year.2:1017T010000Z"/>
+ </C:calendar-data>
+ </D:prop>
+ <C:filter>
+ <C:comp-filter name="VCALENDAR">
+ <C:comp-filter name="VEVENT">
+ <C:time-range end="$now.year.2:1023T065959Z" start="$now.year.2:1017T010000Z"/>
+ </C:comp-filter>
+ </C:comp-filter>
+ </C:filter>
+ <C:timezone-id>bogus</C:timezone-id>
+</C:calendar-query>
Added: CalDAVTester/trunk/Resource/CalDAV/timezones/properties/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/timezones/properties/1.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/timezones/properties/1.xml 2015-04-09 16:55:50 UTC (rev 14668)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:prop>
+<C:calendar-timezone/>
+</D:prop>
+</D:propfind>
Added: CalDAVTester/trunk/Resource/CalDAV/timezones/properties/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/timezones/properties/2.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/timezones/properties/2.xml 2015-04-09 16:55:50 UTC (rev 14668)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:prop>
+<C:calendar-timezone-id/>
+</D:prop>
+</D:propfind>
Added: CalDAVTester/trunk/Resource/CalDAV/timezones/properties/3.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/timezones/properties/3.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/timezones/properties/3.xml 2015-04-09 16:55:50 UTC (rev 14668)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:set>
+<D:prop>
+<C:calendar-timezone>BEGIN:VCALENDAR
+VERSION:2.0
+CALSCALE:GREGORIAN
+PRODID:-//calendarserver.org//Zonal//EN
+BEGIN:VTIMEZONE
+TZID:Etc/GMT+1
+X-LIC-LOCATION:Etc/GMT+1
+BEGIN:STANDARD
+DTSTART:18000101T000000
+RDATE:18000101T000000
+TZNAME:GMT+1
+TZOFFSETFROM:-0100
+TZOFFSETTO:-0100
+END:STANDARD
+END:VTIMEZONE
+END:VCALENDAR
+</C:calendar-timezone>
+</D:prop>
+</D:set>
+</D:propertyupdate>
\ No newline at end of file
Added: CalDAVTester/trunk/Resource/CalDAV/timezones/properties/4.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/timezones/properties/4.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/timezones/properties/4.xml 2015-04-09 16:55:50 UTC (rev 14668)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:remove>
+<D:prop>
+<C:calendar-timezone/>
+</D:prop>
+</D:remove>
+</D:propertyupdate>
\ No newline at end of file
Added: CalDAVTester/trunk/Resource/CalDAV/timezones/properties/5.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/timezones/properties/5.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/timezones/properties/5.xml 2015-04-09 16:55:50 UTC (rev 14668)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:set>
+<D:prop>
+<C:calendar-timezone-id>Etc/GMT+2</C:calendar-timezone-id>
+</D:prop>
+</D:set>
+</D:propertyupdate>
\ No newline at end of file
Modified: CalDAVTester/trunk/scripts/tests/CalDAV/errors.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/errors.xml 2015-04-09 00:32:49 UTC (rev 14667)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/errors.xml 2015-04-09 16:55:50 UTC (rev 14668)
@@ -1518,6 +1518,48 @@
</test>
</test-suite>
+ <test-suite name='Invalid CalDAV:timezone-id'>
+ <require-feature>
+ <feature>timezones-by-reference</feature>
+ </require-feature>
+ <test name='1'>
+ <description>query with invalid timezone id</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/errors/50.xml</filepath>
+ </data>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{urn:ietf:params:xml:ns:caldav}valid-timezone</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>proppatch with invalid timezone id</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/errors/51.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>badprops</name>
+ <value>{urn:ietf:params:xml:ns:caldav}calendar-timezone-id</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
<test-suite name='Invalid urn: calendar user address'>
<test name='1'>
<description>POST free busy</description>
Modified: CalDAVTester/trunk/scripts/tests/CalDAV/reports.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/reports.xml 2015-04-09 00:32:49 UTC (rev 14667)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/reports.xml 2015-04-09 16:55:50 UTC (rev 14668)
@@ -1992,7 +1992,7 @@
</verify>
</request>
</test>
- <test name='12'>
+ <test name='12a'>
<description>Invalid VTIMEZONE check</description>
<request>
<method>REPORT</method>
@@ -2010,6 +2010,27 @@
</verify>
</request>
</test>
+ <test name='12b'>
+ <require-feature>
+ <feature>timezones-by-reference</feature>
+ </require-feature>
+ <description>Invalid TZID check</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/timerangequery/105.xml</filepath>
+ </data>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{urn:ietf:params:xml:ns:caldav}valid-timezone</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
<test name='13'>
<description>query for VEVENTs within time range in distant future</description>
<request>
@@ -3037,7 +3058,7 @@
</verify>
</request>
</test>
- <test name='9'>
+ <test name='9a'>
<description>query with expand all-day - timezone</description>
<request>
<method>REPORT</method>
@@ -3063,6 +3084,35 @@
</verify>
</request>
</test>
+ <test name='9b'>
+ <require-feature>
+ <feature>timezones-by-reference</feature>
+ </require-feature>
+ <description>query with expand all-day - timezone-id</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/reports/limitexpand/14.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>18.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>dataString</callback>
+ <arg>
+ <name>contains</name>
+ <value>VEVENT</value>
+ <value>DTSTART;VALUE=DATE:$now.year.2:1017</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
<test name='10'>
<description>query with expand all-day - recurrence</description>
<request>
Modified: CalDAVTester/trunk/scripts/tests/CalDAV/timezones.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/timezones.xml 2015-04-09 00:32:49 UTC (rev 14667)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/timezones.xml 2015-04-09 16:55:50 UTC (rev 14668)
@@ -167,6 +167,203 @@
</test>
</test-suite>
+ <test-suite name='Timezone properties'>
+ <test name='1'>
+ <description>Empty property</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$calendarpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/timezones/properties/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>badprops</name>
+ <value>{$CALDAV:}calendar-timezone</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <require-feature>
+ <feature>timezones-by-reference</feature>
+ </require-feature>
+ <description>Empty tzid property</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$calendarpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/timezones/properties/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>badprops</name>
+ <value>{$CALDAV:}calendar-timezone-id</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>Add property</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/timezones/properties/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{$CALDAV:}calendar-timezone</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>Property with value</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$calendarpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/timezones/properties/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindValues</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{$CALDAV:}calendar-timezone$.*TZID:Etc/GMT+1.*</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5'>
+ <require-feature>
+ <feature>timezones-by-reference</feature>
+ </require-feature>
+ <description>Tzid property with value</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$calendarpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/timezones/properties/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{$CALDAV:}calendar-timezone-id$Etc/GMT+1</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6'>
+ <description>Change tzid property</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/timezones/properties/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{$CALDAV:}calendar-timezone-id</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='7'>
+ <description>Property with value</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$calendarpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/timezones/properties/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindValues</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{$CALDAV:}calendar-timezone$.*TZID:Etc/GMT+2.*</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='8'>
+ <require-feature>
+ <feature>timezones-by-reference</feature>
+ </require-feature>
+ <description>Tzid property with value</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$calendarpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/timezones/properties/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{$CALDAV:}calendar-timezone-id$Etc/GMT+2</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='-1'>
+ <description>Remove property</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/timezones/properties/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{$CALDAV:}calendar-timezone</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
<end/>
</caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150409/d544a6c8/attachment-0001.html>
More information about the calendarserver-changes
mailing list