[CalendarServer-changes] [14810] CalDAVTester/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed May 20 12:54:29 PDT 2015
Revision: 14810
http://trac.calendarserver.org//changeset/14810
Author: sagen at apple.com
Date: 2015-05-20 12:54:29 -0700 (Wed, 20 May 2015)
Log Message:
-----------
Test to make sure trashed events do not show up in freebusy
Modified Paths:
--------------
CalDAVTester/trunk/scripts/tests/CalDAV/trash.xml
Added Paths:
-----------
CalDAVTester/trunk/Resource/CalDAV/trash/allday.ics
CalDAVTester/trunk/Resource/CalDAV/trash/fb.ics
CalDAVTester/trunk/Resource/CalDAV/trash/timed.ics
Added: CalDAVTester/trunk/Resource/CalDAV/trash/allday.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/trash/allday.ics (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/trash/allday.ics 2015-05-20 19:54:29 UTC (rev 14810)
@@ -0,0 +1,13 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Example Inc.//Example Calendar//EN
+VERSION:2.0
+BEGIN:VEVENT
+DTSTAMP:20051228T232517Z
+DTSTART;VALUE=DATE:$now.0:
+DURATION:P1D
+LOCATION:Durham
+SUMMARY:Meeting 1
+UID:$uid2:
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/CalDAV/trash/fb.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/trash/fb.ics (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/trash/fb.ics 2015-05-20 19:54:29 UTC (rev 14810)
@@ -0,0 +1,14 @@
+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:
+DTSTART:$now.0:T000000Z
+DTSTAMP:20060309T185105Z
+DTEND:$now.1:T000000Z
+END:VFREEBUSY
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/CalDAV/trash/timed.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/trash/timed.ics (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/trash/timed.ics 2015-05-20 19:54:29 UTC (rev 14810)
@@ -0,0 +1,31 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Example Inc.//Example Calendar//EN
+VERSION:2.0
+BEGIN:VTIMEZONE
+LAST-MODIFIED:20040110T032845Z
+TZID:US/Eastern
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+DTSTAMP:20051228T232517Z
+DTSTART;TZID=US/Eastern:$now.0:T090000
+DURATION:PT1H
+LOCATION:Durham
+SUMMARY:Meeting 1
+UID:$uid1:
+END:VEVENT
+END:VCALENDAR
Modified: CalDAVTester/trunk/scripts/tests/CalDAV/trash.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/trash.xml 2015-05-20 08:39:48 UTC (rev 14809)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/trash.xml 2015-05-20 19:54:29 UTC (rev 14810)
@@ -28,7 +28,7 @@
<start/>
- <test-suite name='Trash recovery'>
+ <test-suite name='Simple trashed event recovery'>
<test name='1'>
<description>PUT an event</description>
<request>
@@ -81,9 +81,169 @@
<method>DELETE</method>
<ruri>$calendarhome1:/tobedeleted/</ruri>
</request>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarhome1:/?action=emptytrash</ruri>
+ </request>
</test>
</test-suite>
+
+ <test-suite name='Trashed events do not show up in freebusy'>
+ <test name='1'>
+ <description>PUT an event</description>
+ <request>
+ <method>MKCALENDAR</method>
+ <ruri>$calendarhome1:/tobedeleted/</ruri>
+ </request>
+ </test>
+ <test name='2'>
+ <description>PUT timed event</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/tobedeleted/timed.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/trash/timed.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>Freebusy matches timed event</description>
+ <request print-response="yes">
+ <method>POST</method>
+ <ruri>$outboxpath1:/</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/trash/fb.ics</filepath>
+ </data>
+ <verify>
+ <callback>postFreeBusy</callback>
+ <arg>
+ <name>attendee</name>
+ <value>$cuaddr1:</value>
+ </arg>
+ <arg>
+ <name>busy</name>
+ <value>$now.0:T130000Z/$now.0:T140000Z</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>PUT all-day event</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/tobedeleted/allday.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/trash/allday.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='5'>
+ <description>Freebusy matches all-day event</description>
+ <request print-response="yes">
+ <method>POST</method>
+ <ruri>$outboxpath1:/</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/trash/fb.ics</filepath>
+ </data>
+ <verify>
+ <callback>postFreeBusy</callback>
+ <arg>
+ <name>attendee</name>
+ <value>$cuaddr1:</value>
+ </arg>
+ <arg>
+ <name>busy</name>
+ <value>$now.0:T000000Z/$now.1:T000000Z</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6'>
+ <description>Delete all-day event</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/tobedeleted/allday.ics</ruri>
+ </request>
+ </test>
+ <test name='7'>
+ <description>Freebusy matches timed event</description>
+ <request print-response="yes">
+ <method>POST</method>
+ <ruri>$outboxpath1:/</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/trash/fb.ics</filepath>
+ </data>
+ <verify>
+ <callback>postFreeBusy</callback>
+ <arg>
+ <name>attendee</name>
+ <value>$cuaddr1:</value>
+ </arg>
+ <arg>
+ <name>busy</name>
+ <value>$now.0:T130000Z/$now.0:T140000Z</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='8'>
+ <description>Recover trashed all-day event</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarhome1:/?action=recovertrash&mode=event&id=all</ruri>
+ </request>
+ </test>
+ <test name='9'>
+ <description>Freebusy matches all-day event once more</description>
+ <request print-response="yes">
+ <method>POST</method>
+ <ruri>$outboxpath1:/</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/trash/fb.ics</filepath>
+ </data>
+ <verify>
+ <callback>postFreeBusy</callback>
+ <arg>
+ <name>attendee</name>
+ <value>$cuaddr1:</value>
+ </arg>
+ <arg>
+ <name>busy</name>
+ <value>$now.0:T000000Z/$now.1:T000000Z</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='10'>
+ <description>Clean up</description>
+ <request>
+ <method>DELETEALL</method>
+ <ruri>$calendarhome1:/tobedeleted/</ruri>
+ </request>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/tobedeleted/</ruri>
+ </request>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarhome1:/?action=emptytrash</ruri>
+ </request>
+ </test>
+ </test-suite>
+
<end/>
</caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150520/2280b8ca/attachment.html>
More information about the calendarserver-changes
mailing list