[CalendarServer-changes] [10000] CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/ tests/CalDAV/managed-attachments.xml
source_changes at macosforge.org
source_changes at macosforge.org
Fri Nov 2 13:40:27 PDT 2012
Revision: 10000
http://trac.calendarserver.org//changeset/10000
Author: cdaboo at apple.com
Date: 2012-11-02 13:40:27 -0700 (Fri, 02 Nov 2012)
Log Message:
-----------
Bunch more managed attachments tests.
Modified Paths:
--------------
CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/managed-attachments.xml
Modified: CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/managed-attachments.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/managed-attachments.xml 2012-10-31 20:23:38 UTC (rev 9999)
+++ CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/managed-attachments.xml 2012-11-02 20:40:27 UTC (rev 10000)
@@ -59,7 +59,7 @@
</test>
</test-suite>
- <test-suite name='Simple non-recurring, non-scheduled attachment processing'>
+ <test-suite name='Simple non-recurring, non-scheduled attachment processing no prefer'>
<test name='1' ignore='no'>
<description>PUT event</description>
<request end-delete='no'>
@@ -155,13 +155,17 @@
<name>contains</name>
<value>ATTACH</value>
<value>;FILENAME=</value>
- <value>;FMT-TYPE=</value>
+ <value>;FMTTYPE=</value>
<value>;SIZE=</value>
<value>;MTAG=</value>
<value>;MANAGED-ID=$managed-id:</value>
<value>:$location:</value>
</arg>
</verify>
+ <grabheader>
+ <name>ETag</name>
+ <variable>$etag:</variable>
+ </grabheader>
</request>
</test>
<test name='4' ignore='no'>
@@ -178,8 +182,410 @@
</verify>
</request>
</test>
+ <test name='5' ignore='no'>
+ <description>Remove attachment (no prefer)</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarpath1:/1.ics?action=attachment-remove&managed-id=$managed-id:</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <description>Check for no ATTACH property</description>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>header</callback>
+ <arg>
+ <name>header</name>
+ <value>ETag!$etag:</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/simple/1.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='7' ignore='no'>
+ <description>Check for attachment</description>
+ <request>
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>404</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='8' ignore='no'>
+ <description>Delete calendar data</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
</test-suite>
+ <test-suite name='Simple non-recurring, non-scheduled attachment processing with prefer'>
+ <test name='1' ignore='no'>
+ <description>PUT event</description>
+ <request end-delete='no'>
+ <method>PUT</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/managedattachments/simple/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/simple/1.ics</value>
+ </arg>
+ </verify>
+ <grabheader>
+ <name>ETag</name>
+ <variable>$etag:</variable>
+ </grabheader>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Add attachment (with prefer)</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarpath1:/1.ics?action=attachment-add</ruri>
+ <header>
+ <name>Content-Disposition</name>
+ <value>attachment;filename=test.txt</value>
+ </header>
+ <header>
+ <name>Prefer</name>
+ <value>return-representation</value>
+ </header>
+ <data>
+ <content-type>text/plain</content-type>
+ <filepath>Resource/CalDAV/managedattachments/simple/2.txt</filepath>
+ </data>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/simple/1.ics</value>
+ </arg>
+ <arg>
+ <name>filter</name>
+ <value>ATTACH</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>dataString</callback>
+ <arg>
+ <name>unwrap</name>
+ <value/>
+ </arg>
+ <arg>
+ <name>contains</name>
+ <value>ATTACH</value>
+ <value>;FILENAME=</value>
+ <value>;FMTTYPE=</value>
+ <value>;SIZE=</value>
+ <value>;MTAG=</value>
+ <value>;MANAGED-ID=</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>header</callback>
+ <arg>
+ <name>header</name>
+ <value>Cal-Managed-ID</value>
+ </arg>
+ </verify>
+ <grabheader>
+ <name>Location</name>
+ <variable>$location:</variable>
+ </grabheader>
+ <grabheader>
+ <name>Cal-Managed-ID</name>
+ <variable>$managed-id:</variable>
+ </grabheader>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>Check for ATTACH property</description>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>header</callback>
+ <arg>
+ <name>header</name>
+ <value>ETag!$etag:</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/simple/1.ics</value>
+ </arg>
+ <arg>
+ <name>filter</name>
+ <value>ATTACH</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>dataString</callback>
+ <arg>
+ <name>unwrap</name>
+ <value/>
+ </arg>
+ <arg>
+ <name>contains</name>
+ <value>ATTACH</value>
+ <value>;FILENAME=</value>
+ <value>;FMTTYPE=</value>
+ <value>;SIZE=</value>
+ <value>;MTAG=</value>
+ <value>;MANAGED-ID=$managed-id:</value>
+ <value>:$location:</value>
+ </arg>
+ </verify>
+ <grabheader>
+ <name>ETag</name>
+ <variable>$etag:</variable>
+ </grabheader>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>Check for attachment</description>
+ <request>
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>dataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/simple/2.txt</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5' ignore='no'>
+ <description>Remove attachment (with prefer)</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarpath1:/1.ics?action=attachment-remove&managed-id=$managed-id:</ruri>
+ <header>
+ <name>Prefer</name>
+ <value>return-representation</value>
+ </header>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/simple/1.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <description>Check for no ATTACH property</description>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>header</callback>
+ <arg>
+ <name>header</name>
+ <value>ETag!$etag:</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/simple/1.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='7' ignore='no'>
+ <description>Check for attachment</description>
+ <request>
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>404</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='8' ignore='no'>
+ <description>Delete calendar data</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Simple non-recurring, non-scheduled attachment processing with resource removal'>
+ <test name='1' ignore='no'>
+ <description>PUT event</description>
+ <request end-delete='no'>
+ <method>PUT</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/managedattachments/simple/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/simple/1.ics</value>
+ </arg>
+ </verify>
+ <grabheader>
+ <name>ETag</name>
+ <variable>$etag:</variable>
+ </grabheader>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Add attachment</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarpath1:/1.ics?action=attachment-add</ruri>
+ <header>
+ <name>Content-Disposition</name>
+ <value>attachment;filename=test.txt</value>
+ </header>
+ <header>
+ <name>Prefer</name>
+ <value>return-representation</value>
+ </header>
+ <data>
+ <content-type>text/plain</content-type>
+ <filepath>Resource/CalDAV/managedattachments/simple/2.txt</filepath>
+ </data>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/simple/1.ics</value>
+ </arg>
+ <arg>
+ <name>filter</name>
+ <value>ATTACH</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>dataString</callback>
+ <arg>
+ <name>unwrap</name>
+ <value/>
+ </arg>
+ <arg>
+ <name>contains</name>
+ <value>ATTACH</value>
+ <value>;FILENAME=</value>
+ <value>;FMTTYPE=</value>
+ <value>;SIZE=</value>
+ <value>;MTAG=</value>
+ <value>;MANAGED-ID=</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>header</callback>
+ <arg>
+ <name>header</name>
+ <value>Cal-Managed-ID</value>
+ </arg>
+ </verify>
+ <grabheader>
+ <name>Location</name>
+ <variable>$location:</variable>
+ </grabheader>
+ <grabheader>
+ <name>Cal-Managed-ID</name>
+ <variable>$managed-id:</variable>
+ </grabheader>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>Check for attachment</description>
+ <request>
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>dataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/simple/2.txt</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5' ignore='no'>
+ <description>Delete calendar data</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <description>Check for attachment</description>
+ <request>
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>404</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/20121102/1d784715/attachment-0001.html>
More information about the calendarserver-changes
mailing list