[CalendarServer-changes] [14814] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Thu May 21 17:07:05 PDT 2015


Revision: 14814
          http://trac.calendarserver.org//changeset/14814
Author:   sagen at apple.com
Date:     2015-05-21 17:07:05 -0700 (Thu, 21 May 2015)
Log Message:
-----------
Added test for organizer-trashed event

Modified Paths:
--------------
    CalDAVTester/trunk/scripts/tests/CalDAV/trash.xml

Added Paths:
-----------
    CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/
    CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/cancelled.ics
    CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/invite.ics
    CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/recovered.ics
    CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/reply.ics

Added: CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/cancelled.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/cancelled.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/cancelled.ics	2015-05-22 00:07:05 UTC (rev 14814)
@@ -0,0 +1,19 @@
+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=$username2:;EMAIL=$email2:;PARTSTAT=TENTATIVE:$cuaddrurn2:
+CREATED:20060110T231240Z
+DESCRIPTION:Call-in
+DTSTAMP:20060309T185105Z
+ORGANIZER;CN=$username1:;EMAIL=$email1:;SCHEDULE-STATUS=1.2:$cuaddrurn1:
+SEQUENCE:2
+STATUS:CANCELLED
+SUMMARY:Example
+TRANSP:OPAQUE
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/invite.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/invite.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/invite.ics	2015-05-22 00:07:05 UTC (rev 14814)
@@ -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=$username2:;RSVP=TRUE:$cuaddralt2:
+CREATED:20060110T231240Z
+DESCRIPTION:Call-in
+DTSTAMP:20060309T185105Z
+ORGANIZER;CN=$username1::$cuaddralt1:
+STATUS:CONFIRMED
+SUMMARY:Example
+TRANSP:OPAQUE
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/recovered.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/recovered.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/recovered.ics	2015-05-22 00:07:05 UTC (rev 14814)
@@ -0,0 +1,19 @@
+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=NEEDS-ACTION;RSVP=TRUE:$cuaddrurn1:
+ATTENDEE;CN=$username2:;EMAIL=$email2:;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:$cuaddrurn2:
+CREATED:20060110T231240Z
+DESCRIPTION:Call-in
+DTSTAMP:20060309T185105Z
+ORGANIZER;CN=$username1:;EMAIL=$email1::$cuaddrurn1:
+SEQUENCE:1
+STATUS:CONFIRMED
+SUMMARY:Example
+TRANSP:TRANSPARENT
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/reply.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/reply.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/trash/organizertrash/reply.ics	2015-05-22 00:07:05 UTC (rev 14814)
@@ -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=$username2:;PARTSTAT=TENTATIVE:$cuaddralt2:
+CREATED:20060110T231240Z
+DESCRIPTION:Call-in
+DTSTAMP:20060309T185105Z
+ORGANIZER;CN=$username1::$cuaddralt1:
+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-21 17:41:54 UTC (rev 14813)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/trash.xml	2015-05-22 00:07:05 UTC (rev 14814)
@@ -91,7 +91,7 @@
 
 	<test-suite name='Trashed events do not show up in freebusy'>
 		<test name='1'>
-			<description>PUT an event</description>
+			<description>Create a calendar</description>
 	        <request>
 	            <method>MKCALENDAR</method>
 	            <ruri>$calendarhome1:/tobedeleted/</ruri>
@@ -244,6 +244,147 @@
 		</test>
 	</test-suite>
 
+    <test-suite name='Organizer trashes event'>
+        <test name='1'>
+            <description>Create a calendar</description>
+            <request>
+                <method>MKCALENDAR</method>
+                <ruri>$calendarhome1:/tobedeleted/</ruri>
+            </request>
+        </test>
+        <test name='2'>
+            <description>PUT scheduled event</description>
+            <request>
+                <method>PUT</method>
+                <ruri>$calendarhome1:/tobedeleted/1.ics</ruri>
+                <data>
+                    <content-type>text/calendar; charset=utf-8</content-type>
+                    <filepath>Resource/CalDAV/trash/organizertrash/invite.ics</filepath>
+                </data>
+                <verify>
+                    <callback>statusCode</callback>
+                </verify>
+            </request>
+        </test>
+        <test name='3'>
+            <description>One item in user02 Inbox</description>
+            <request user="$useradmin:" pswd="$pswdadmin:">
+                <method>WAITDELETEALL 1</method>
+                <ruri>$inboxpath2:/</ruri>
+            </request>
+        </test>
+        <test name='4'>
+            <description>Attendee -> Accepted</description>
+            <request user="$userid2:" pswd="$pswd2:">
+                <method>GETNEW</method>
+                <ruri>$calendarpath2:/</ruri>
+                <verify>
+                    <callback>statusCode</callback>
+                </verify>
+            </request>
+            <request user="$userid2:" pswd="$pswd2:">
+                <method>PUT</method>
+                <ruri>$</ruri>
+                <data>
+                    <content-type>text/calendar; charset=utf-8</content-type>
+                    <filepath>Resource/CalDAV/trash/organizertrash/reply.ics</filepath>
+                </data>
+                <verify>
+                    <callback>statusCode</callback>
+                </verify>
+            </request>
+        </test>
+        <test name='5'>
+            <description>One item in user01 Inbox</description>
+            <request user="$useradmin:" pswd="$pswdadmin:">
+                <method>WAITDELETEALL 1</method>
+                <ruri>$inboxpath1:/</ruri>
+            </request>
+        </test>
+        <test name='6'>
+            <description>Organizer trashes event</description>
+            <request>
+                <method>DELETE</method>
+                <ruri>$calendarhome1:/tobedeleted/1.ics</ruri>
+            </request>
+        </test>
+        <test name='7'>
+            <description>One item in user02 Inbox</description>
+            <request user="$useradmin:" pswd="$pswdadmin:">
+                <method>WAITDELETEALL 1</method>
+                <ruri>$inboxpath2:/</ruri>
+            </request>
+        </test>
+        <test name='8'>
+            <description>Attendee sees cancellation</description>
+            <request user="$userid2:" pswd="$pswd2:">
+                <method>GETNEW</method>
+                <ruri>$calendarpath2:/</ruri>
+                <verify>
+                    <callback>calendarDataMatch</callback>
+                    <arg>
+                        <name>filepath</name>
+                        <value>Resource/CalDAV/trash/organizertrash/cancelled.ics</value>
+                    </arg>
+                </verify>
+            </request>
+        </test>
+        <test name='9'>
+            <description>Attendee deletes cancellation</description>
+            <request user="$userid2:" pswd="$pswd2:">
+                <method>DELETE</method>
+                <ruri>$</ruri>
+                <verify>
+                    <callback>statusCode</callback>
+                </verify>
+            </request>
+        </test>
+
+        <test name='10'>
+            <description>Recover trash</description>
+            <request>
+                <method>POST</method>
+                <ruri>$calendarhome1:/?action=recovertrash&amp;mode=event&amp;id=all</ruri>
+            </request>
+        </test>
+        <test name='11'>
+            <description>One item in user02 Inbox</description>
+            <request user="$useradmin:" pswd="$pswdadmin:">
+                <method>WAITDELETEALL 1</method>
+                <ruri>$inboxpath2:/</ruri>
+            </request>
+        </test>
+        <test name='12'>
+            <description>Attendee sees re-invite</description>
+            <request user="$userid2:" pswd="$pswd2:">
+                <method>GETNEW</method>
+                <ruri>$calendarpath2:/</ruri>
+                <verify>
+                    <callback>calendarDataMatch</callback>
+                    <arg>
+                        <name>filepath</name>
+                        <value>Resource/CalDAV/trash/organizertrash/recovered.ics</value>
+                    </arg>
+                </verify>
+            </request>
+        </test>
+        <test name='13'>
+            <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/20150521/eb64c151/attachment-0001.html>


More information about the calendarserver-changes mailing list