[CalendarServer-changes] [14835] CalDAVTester/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed May 27 11:24:04 PDT 2015
Revision: 14835
http://trac.calendarserver.org//changeset/14835
Author: cdaboo at apple.com
Date: 2015-05-27 11:24:04 -0700 (Wed, 27 May 2015)
Log Message:
-----------
Tests for trash recovery of schedule-agent=none event.
Modified Paths:
--------------
CalDAVTester/trunk/scripts/tests/CalDAV/trash.xml
Added Paths:
-----------
CalDAVTester/trunk/Resource/CalDAV/trash/attendeenone/
CalDAVTester/trunk/Resource/CalDAV/trash/attendeenone/invite.ics
CalDAVTester/trunk/Resource/CalDAV/trash/attendeenone/recovered.ics
Added: CalDAVTester/trunk/Resource/CalDAV/trash/attendeenone/invite.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/trash/attendeenone/invite.ics (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/trash/attendeenone/invite.ics 2015-05-27 18:24:04 UTC (rev 14835)
@@ -0,0 +1,18 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Inc.//Example Calendar//EN
+BEGIN:VEVENT
+UID:$uid1:
+DTSTART:$now.8:T200000Z
+DURATION:PT1H
+ATTENDEE;CN=$username1:;PARTSTAT=ACCEPTED:$cuaddralt1:
+ATTENDEE;CN=$username3:;RSVP=TRUE:$cuaddralt3:
+CREATED:20060110T231240Z
+DESCRIPTION:Call-in
+DTSTAMP:20060309T185105Z
+ORGANIZER;SCHEDULE-AGENT=NONE;CN=$username1::$cuaddralt1:
+STATUS:CONFIRMED
+SUMMARY:Example
+TRANSP:OPAQUE
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/CalDAV/trash/attendeenone/recovered.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/trash/attendeenone/recovered.ics (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/trash/attendeenone/recovered.ics 2015-05-27 18:24:04 UTC (rev 14835)
@@ -0,0 +1,18 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Inc.//Example Calendar//EN
+BEGIN:VEVENT
+UID:$uid1:
+DTSTART:$now.8:T200000Z
+DURATION:PT1H
+ATTENDEE;CN=$username1:;EMAIL=$email1:;PARTSTAT=ACCEPTED:$cuaddrurn1:
+ATTENDEE;CN=$username3:;EMAIL=$email3:;RSVP=TRUE:$cuaddrurn3:
+CREATED:20060110T231240Z
+DESCRIPTION:Call-in
+DTSTAMP:20060309T185105Z
+ORGANIZER;CN=$username1:;EMAIL=$email1:;SCHEDULE-AGENT=NONE:$cuaddrurn1:
+STATUS:CONFIRMED
+SUMMARY:Example
+TRANSP:OPAQUE
+END:VEVENT
+END:VCALENDAR
Modified: CalDAVTester/trunk/scripts/tests/CalDAV/trash.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/trash.xml 2015-05-27 14:45:30 UTC (rev 14834)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/trash.xml 2015-05-27 18:24:04 UTC (rev 14835)
@@ -44,7 +44,12 @@
<request>
<method>MKCALENDAR</method>
<ruri>$calendarhome1:/tobedeleted/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
+ </test>
+ <test name='2'>
<request>
<method>PUT</method>
<ruri>$calendarhome1:/tobedeleted/1.ics</ruri>
@@ -52,11 +57,21 @@
<content-type>text/calendar; charset=utf-8</content-type>
<filepath>Resource/CalDAV/trash/1.txt</filepath>
</data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
+ </test>
+ <test name='3'>
<request>
<method>DELETE</method>
<ruri>$calendarhome1:/tobedeleted/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
+ </test>
+ <test name='4'>
<request>
<method>GET</method>
<ruri>$calendarhome1:/tobedeleted/1.ics</ruri>
@@ -68,10 +83,17 @@
</arg>
</verify>
</request>
+ </test>
+ <test name='5'>
<request>
<method>POST</method>
<ruri>$calendarhome1:/?action=recovertrash&mode=event&id=all</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
+ </test>
+ <test name='6'>
<request>
<method>GETNEW</method>
<ruri>$calendarhome1:/tobedeleted/</ruri>
@@ -107,6 +129,9 @@
<request>
<method>MKCALENDAR</method>
<ruri>$calendarhome1:/tobedeleted/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
</test>
<test name='2'>
@@ -186,6 +211,9 @@
<request>
<method>DELETE</method>
<ruri>$calendarhome1:/tobedeleted/allday.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
</test>
<test name='7'>
@@ -215,6 +243,9 @@
<request>
<method>POST</method>
<ruri>$calendarhome1:/?action=recovertrash&mode=event&id=all</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
</test>
<test name='9'>
@@ -261,6 +292,9 @@
<request>
<method>MKCALENDAR</method>
<ruri>$calendarhome1:/tobedeleted/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
</test>
<test name='2'>
@@ -317,6 +351,9 @@
<request>
<method>DELETE</method>
<ruri>$calendarhome1:/tobedeleted/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
</test>
<test name='7'>
@@ -356,6 +393,9 @@
<request>
<method>POST</method>
<ruri>$calendarhome1:/?action=recovertrash&mode=event&id=all</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
</test>
<test name='11'>
@@ -413,6 +453,9 @@
<request>
<method>MKCALENDAR</method>
<ruri>$calendarhome1:/tobedeleted/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
</test>
<test name='2'>
@@ -469,6 +512,9 @@
<request user="$userid2:" pswd="$pswd2:">
<method>DELETE</method>
<ruri>$</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
</test>
<test name='7'>
@@ -497,6 +543,9 @@
<request>
<method>POST</method>
<ruri>$calendarhome2:/?action=recovertrash&mode=event&id=all</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
</test>
<test name='10'>
@@ -556,6 +605,9 @@
<request end-delete="yes">
<method>MKCALENDAR</method>
<ruri>$calendarhome1:/shared/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
<request>
<method>POST</method>
@@ -575,6 +627,9 @@
<request user="$userid2:" pswd="$pswd2:">
<method>GETNEW</method>
<ruri>$notificationpath2:/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
<grabelement>
<name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
<variable>$inviteuid2:</variable>
@@ -591,6 +646,9 @@
<content-type>application/xml; charset=utf-8</content-type>
<filepath>Resource/Common/POST/sharingreply2.xml</filepath>
</data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
<grabelement>
<name>{DAV:}href</name>
<variable>$sharedcalendar2:</variable>
@@ -607,6 +665,9 @@
<content-type>text/calendar; charset=utf-8</content-type>
<filepath>Resource/CalDAV/sharing/peruser-data/simple-put/1.ics</filepath>
</data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
</test>
@@ -655,6 +716,9 @@
<request>
<method>POST</method>
<ruri>$calendarhome1:/?action=recovertrash&mode=event&id=all</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
</request>
</test>
@@ -698,6 +762,76 @@
</test-suite>
- <end/>
+ <test-suite name='Attendee trashes SCHEDULE-AGENT=NONE event'>
+ <test name='1'>
+ <description>PUT scheduled event</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>PUT</method>
+ <ruri>$calendarpath2:/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/trash/attendeenone/invite.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>Attendee trashes event</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>DELETE</method>
+ <ruri>$calendarpath2:/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>Attendee recovers trash</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarhome2:/?action=recovertrash&mode=event&id=all</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>Attendee has event</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GETNEW</method>
+ <ruri>$calendarpath2:/</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/trash/attendeenone/recovered.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='clean up'>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>DELETEALL</method>
+ <ruri>$calendarpath2:/</ruri>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>POST</method>
+ <ruri>$calendarhome2:/?action=emptytrash</ruri>
+ </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: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150527/70f5c93d/attachment-0001.html>
More information about the calendarserver-changes
mailing list