[CalendarServer-changes] [10121] CalDAVTester/branches/users/cdaboo/managed-attachments
source_changes at macosforge.org
source_changes at macosforge.org
Tue Dec 4 08:47:12 PST 2012
Revision: 10121
http://trac.calendarserver.org//changeset/10121
Author: cdaboo at apple.com
Date: 2012-12-04 08:47:12 -0800 (Tue, 04 Dec 2012)
Log Message:
-----------
Tests for managed attachments and sharing, MOVE and managed attachments.
Modified Paths:
--------------
CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/server/serverinfo-partitioning.xml
CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/server/serverinfo-template.xml
CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/server/serverinfo.xml
CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/copymove.xml
CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/ctag.xml
CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/errors.xml
CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/managed-attachments.xml
Added Paths:
-----------
CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/CalDAV/managedattachments/sharing/
CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/CalDAV/managedattachments/sharing/1.ics
CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/CalDAV/managedattachments/sharing/2.txt
CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/CalDAV/managedattachments/sharing/3.ics
CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/Common/POST/sharingremove23.xml
CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/Common/PROPFIND/current-user-privilege-set.xml
CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/managed-attachments-sharing.xml
Added: CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/CalDAV/managedattachments/sharing/1.ics
===================================================================
--- CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/CalDAV/managedattachments/sharing/1.ics (rev 0)
+++ CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/CalDAV/managedattachments/sharing/1.ics 2012-12-04 16:47:12 UTC (rev 10121)
@@ -0,0 +1,11 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Inc.//Example Calendar//EN
+BEGIN:VEVENT
+UID:put-1 at example.com
+DTSTART:$now.year.1:0101T120000Z
+DURATION:P1DT
+DTSTAMP:20051222T205953Z
+SUMMARY:event 1
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/CalDAV/managedattachments/sharing/2.txt
===================================================================
--- CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/CalDAV/managedattachments/sharing/2.txt (rev 0)
+++ CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/CalDAV/managedattachments/sharing/2.txt 2012-12-04 16:47:12 UTC (rev 10121)
@@ -0,0 +1,3 @@
+This is a text file being used
+as a test of managed attachment
+support in calendarserver.
Added: CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/CalDAV/managedattachments/sharing/3.ics
===================================================================
--- CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/CalDAV/managedattachments/sharing/3.ics (rev 0)
+++ CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/CalDAV/managedattachments/sharing/3.ics 2012-12-04 16:47:12 UTC (rev 10121)
@@ -0,0 +1,12 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Inc.//Example Calendar//EN
+BEGIN:VEVENT
+UID:put-2 at example.com
+DTSTART:$now.year.1:0101T140000Z
+DURATION:P1DT
+DTSTAMP:20051222T205953Z
+ATTACH;MANAGED-ID=$managed_id1:;MTAG=$mtag1:;FMTTYPE=$fmttype1:;FILENAME=$filename1:;SIZE=$size1::$attach1:
+SUMMARY:event 2
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/Common/POST/sharingremove23.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/Common/POST/sharingremove23.xml (rev 0)
+++ CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/Common/POST/sharingremove23.xml 2012-12-04 16:47:12 UTC (rev 10121)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<CS:share xmlns:D="DAV:" xmlns:CS="http://calendarserver.org/ns/">
+ <CS:remove>
+ <D:href>$cuaddr2:</D:href>
+ <CS:read-write/>
+ </CS:remove>
+ <CS:remove>
+ <D:href>$cuaddr3:</D:href>
+ <CS:read/>
+ </CS:remove>
+</CS:share>
Added: CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/Common/PROPFIND/current-user-privilege-set.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/Common/PROPFIND/current-user-privilege-set.xml (rev 0)
+++ CalDAVTester/branches/users/cdaboo/managed-attachments/Resource/Common/PROPFIND/current-user-privilege-set.xml 2012-12-04 16:47:12 UTC (rev 10121)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:current-user-privilege-set/>
+</D:prop>
+</D:propfind>
Modified: CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/server/serverinfo-partitioning.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/server/serverinfo-partitioning.xml 2012-12-04 02:01:59 UTC (rev 10120)
+++ CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/server/serverinfo-partitioning.xml 2012-12-04 16:47:12 UTC (rev 10121)
@@ -256,6 +256,12 @@
<value>dropbox</value>
</substitution>
+ <!-- attachments name-->
+ <substitution>
+ <key>$attachments:</key>
+ <value>attachments</value>
+ </substitution>
+
<!-- notification name-->
<substitution>
<key>$notification:</key>
Modified: CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/server/serverinfo-template.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/server/serverinfo-template.xml 2012-12-04 02:01:59 UTC (rev 10120)
+++ CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/server/serverinfo-template.xml 2012-12-04 16:47:12 UTC (rev 10121)
@@ -256,6 +256,12 @@
<value>dropbox</value>
</substitution>
+ <!-- attachments name-->
+ <substitution>
+ <key>$attachments:</key>
+ <value>attachments</value>
+ </substitution>
+
<!-- notification name-->
<substitution>
<key>$notification:</key>
Modified: CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/server/serverinfo.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/server/serverinfo.xml 2012-12-04 02:01:59 UTC (rev 10120)
+++ CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/server/serverinfo.xml 2012-12-04 16:47:12 UTC (rev 10121)
@@ -256,6 +256,12 @@
<value>dropbox</value>
</substitution>
+ <!-- attachments name-->
+ <substitution>
+ <key>$attachments:</key>
+ <value>attachments</value>
+ </substitution>
+
<!-- notification name-->
<substitution>
<key>$notification:</key>
Modified: CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/copymove.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/copymove.xml 2012-12-04 02:01:59 UTC (rev 10120)
+++ CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/copymove.xml 2012-12-04 16:47:12 UTC (rev 10121)
@@ -448,7 +448,7 @@
<callback>statusCode</callback>
<arg>
<name>status</name>
- <value>2xx</value>
+ <value>403</value>
</arg>
</verify>
</request>
Modified: CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/ctag.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/ctag.xml 2012-12-04 02:01:59 UTC (rev 10120)
+++ CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/ctag.xml 2012-12-04 16:47:12 UTC (rev 10121)
@@ -388,7 +388,7 @@
<require-feature>
<feature>MOVE Method</feature>
</require-feature>
- <description>Check for CTag change on MOVE of existing resource</description>
+ <description>Check for no CTag change on failed MOVE of existing resource</description>
<request>
<method>MOVE</method>
<ruri>$calendarpath1:/2.ics</ruri>
@@ -396,6 +396,13 @@
<name>Destination</name>
<value>$host:$calendarhome1:/movecopy/2.ics</value>
</header>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>403</value>
+ </arg>
+ </verify>
</request>
<request>
<method>PROPFIND</method>
@@ -412,7 +419,7 @@
<callback>propfindItems</callback>
<arg>
<name>okprops</name>
- <value>{http://calendarserver.org/ns/}getctag!$getctag1:</value>
+ <value>{http://calendarserver.org/ns/}getctag$$getctag1:</value>
</arg>
</verify>
<grabproperty>
@@ -435,7 +442,7 @@
<callback>propfindItems</callback>
<arg>
<name>okprops</name>
- <value>{http://calendarserver.org/ns/}getctag!$getctag2:</value>
+ <value>{http://calendarserver.org/ns/}getctag$$getctag2:</value>
</arg>
</verify>
<grabproperty>
Modified: CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/errors.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/errors.xml 2012-12-04 02:01:59 UTC (rev 10120)
+++ CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/errors.xml 2012-12-04 16:47:12 UTC (rev 10121)
@@ -953,10 +953,10 @@
<value>$host:$calendarpath1:/1.ics</value>
</header>
<verify>
- <callback>prepostcondition</callback>
+ <callback>statusCode</callback>
<arg>
- <name>error</name>
- <value>{urn:ietf:params:xml:ns:caldav}no-uid-conflict</value>
+ <name>status</name>
+ <value>403</value>
</arg>
</verify>
</request>
Added: CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/managed-attachments-sharing.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/managed-attachments-sharing.xml (rev 0)
+++ CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/managed-attachments-sharing.xml 2012-12-04 16:47:12 UTC (rev 10121)
@@ -0,0 +1,1343 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2012 Apple Inc. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<caldavtest>
+ <description>Test managed attachments with shared calendars</description>
+
+ <require-feature>
+ <feature>caldav</feature>
+ <feature>managed-attachments</feature>
+ <feature>prefer-representation</feature>
+ <feature>shared-calendars</feature>
+ </require-feature>
+
+ <start>
+ <request end-delete="yes">
+ <method>MKCALENDAR</method>
+ <ruri>$calendarhome1:/shared/</ruri>
+ </request>
+ <request print-response='no'>
+ <method>POST</method>
+ <ruri>$calendarhome1:/shared/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/POST/sharinginvite23.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:" print-response='no'>
+ <method>WAITCOUNT 1</method>
+ <ruri>$notificationpath2:/</ruri>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:" print-response='no'>
+ <method>GETNEW</method>
+ <ruri>$notificationpath2:/</ruri>
+ <grabelement>
+ <name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+ <variable>$inviteuid2:</variable>
+ </grabelement>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:" print-response='no'>
+ <method>POST</method>
+ <ruri>$calendarhome2:/</ruri>
+ <data substitutions='yes'>
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/POST/sharingreply2.xml</filepath>
+ </data>
+ <grabelement>
+ <name>{DAV:}href</name>
+ <variable>$sharedcalendar2:</variable>
+ </grabelement>
+ </request>
+ <request user="$userid3:" pswd="$pswd3:" print-response='no'>
+ <method>WAITCOUNT 1</method>
+ <ruri>$notificationpath3:/</ruri>
+ </request>
+ <request user="$userid3:" pswd="$pswd3:" print-response='no'>
+ <method>GETNEW</method>
+ <ruri>$notificationpath3:/</ruri>
+ <grabelement>
+ <name>{http://calendarserver.org/ns/}invite-notification/{http://calendarserver.org/ns/}uid</name>
+ <variable>$inviteuid3:</variable>
+ </grabelement>
+ </request>
+ <request user="$userid3:" pswd="$pswd3:" print-response='no'>
+ <method>POST</method>
+ <ruri>$calendarhome3:/</ruri>
+ <data substitutions='yes'>
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/POST/sharingreply3.xml</filepath>
+ </data>
+ <grabelement>
+ <name>{DAV:}href</name>
+ <variable>$sharedcalendar3:</variable>
+ </grabelement>
+ </request>
+ </start>
+
+ <test-suite name='Sharer add attachment'>
+ <test name='1' ignore='no'>
+ <description>PUT event</description>
+ <request end-delete='no'>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/managedattachments/sharing/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/sharing/1.ics</value>
+ </arg>
+ </verify>
+ <grabheader>
+ <name>ETag</name>
+ <variable>$etag:</variable>
+ </grabheader>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Sharer add attachment</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarhome1:/shared/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/sharing/2.txt</filepath>
+ </data>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/sharing/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>
+ </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 attachment - sharer</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='4' ignore='no'>
+ <description>Check for attachment - sharees</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <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>
+ <request user="$userid3:" pswd="$pswd3:">
+ <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>Check for attachment - non sharee</description>
+ <request user="$userid4:" pswd="$pswd4:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <description>Remove attachment</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarhome1:/shared/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='7' ignore='no'>
+ <description>Check for attachment - sharer</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>Check for attachment - sharees</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ <request user="$userid3:" pswd="$pswd3:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='9' ignore='no'>
+ <description>Check for attachment - non sharee</description>
+ <request user="$userid4:" pswd="$pswd4:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='10' ignore='no'>
+ <description>Delete calendar data</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Sharee add attachment'>
+ <test name='1' ignore='no'>
+ <description>PUT event</description>
+ <request end-delete='no'>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/managedattachments/sharing/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/sharing/1.ics</value>
+ </arg>
+ </verify>
+ <grabheader>
+ <name>ETag</name>
+ <variable>$etag:</variable>
+ </grabheader>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Read-only sharee cannot add attachment</description>
+ <request user="$userid3:" pswd="$pswd3:">
+ <method>POST</method>
+ <ruri>$sharedcalendar3:/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/sharing/2.txt</filepath>
+ </data>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>Sharee can add attachment</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>POST</method>
+ <ruri>$sharedcalendar2:/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/sharing/2.txt</filepath>
+ </data>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/sharing/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>
+ </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 - sharer</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>Check for attachment - sharees</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <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>
+ <request user="$userid3:" pswd="$pswd3:">
+ <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='6' ignore='no'>
+ <description>Check for attachment - non sharee</description>
+ <request user="$userid4:" pswd="$pswd4:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='7' ignore='no'>
+ <description>Read-only sharee cannot remove attachment</description>
+ <request user="$userid3:" pswd="$pswd3:">
+ <method>POST</method>
+ <ruri>$sharedcalendar3:/1.ics?action=attachment-remove&managed-id=$managed-id:</ruri>
+ <header>
+ <name>Prefer</name>
+ <value>return-representation</value>
+ </header>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='8' ignore='no'>
+ <description>Sharee remove attachment</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>POST</method>
+ <ruri>$sharedcalendar2:/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='9' ignore='no'>
+ <description>Check for attachment - sharer</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='10' ignore='no'>
+ <description>Check for attachment - sharees</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ <request user="$userid3:" pswd="$pswd3:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='11' ignore='no'>
+ <description>Check for attachment - non sharee</description>
+ <request user="$userid4:" pswd="$pswd4:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='12' ignore='no'>
+ <description>Delete calendar data</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Sharee add attachment existing managed-id'>
+ <test name='1' ignore='no'>
+ <description>PUT event</description>
+ <request end-delete='no'>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/managedattachments/sharing/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/sharing/1.ics</value>
+ </arg>
+ </verify>
+ <grabheader>
+ <name>ETag</name>
+ <variable>$etag:</variable>
+ </grabheader>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Sharer add attachment</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarhome1:/shared/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/sharing/2.txt</filepath>
+ </data>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/sharing/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>
+ </arg>
+ </verify>
+ <verify>
+ <callback>header</callback>
+ <arg>
+ <name>header</name>
+ <value>Cal-Managed-ID</value>
+ </arg>
+ </verify>
+ <grabheader>
+ <name>Location</name>
+ <variable>$location1:</variable>
+ </grabheader>
+ <grabcalproperty>
+ <name>VEVENT/ATTACH</name>
+ <variable>$attach1:</variable>
+ </grabcalproperty>
+ <grabcalparameter>
+ <name>VEVENT/ATTACH/MANAGED-ID</name>
+ <variable>$managed_id1:</variable>
+ </grabcalparameter>
+ <grabcalparameter>
+ <name>VEVENT/ATTACH/MTAG</name>
+ <variable>$mtag1:</variable>
+ </grabcalparameter>
+ <grabcalparameter>
+ <name>VEVENT/ATTACH/FILENAME</name>
+ <variable>$filename1:</variable>
+ </grabcalparameter>
+ <grabcalparameter>
+ <name>VEVENT/ATTACH/FMTTYPE</name>
+ <variable>$fmttype1:</variable>
+ </grabcalparameter>
+ <grabcalparameter>
+ <name>VEVENT/ATTACH/SIZE</name>
+ <variable>$size1:</variable>
+ </grabcalparameter>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>Check for attachment - sharer</description>
+ <request>
+ <method>GET</method>
+ <ruri>$attach1:</ruri>
+ <verify>
+ <callback>dataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/simple/2.txt</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>Check for attachment - sharees</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GET</method>
+ <ruri>$attach1:</ruri>
+ <verify>
+ <callback>dataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/simple/2.txt</value>
+ </arg>
+ </verify>
+ </request>
+ <request user="$userid3:" pswd="$pswd3:">
+ <method>GET</method>
+ <ruri>$attach1:</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>Check for attachment - non sharee</description>
+ <request user="$userid4:" pswd="$pswd4:">
+ <method>GET</method>
+ <ruri>$attach1:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <description>PUT another event</description>
+ <request user="$userid2:" pswd="$pswd2:" end-delete='no'>
+ <method>PUT</method>
+ <ruri>$sharedcalendar2:/2.ics</ruri>
+ <header>
+ <name>Prefer</name>
+ <value>return-representation</value>
+ </header>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/managedattachments/sharing/3.ics</filepath>
+ </data>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/sharing/3.ics</value>
+ </arg>
+ <arg>
+ <name>filter</name>
+ <value>ATTACH</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>dataString</callback>
+ <arg>
+ <name>unwrap</name>
+ <value/>
+ </arg>
+ <arg>
+ <name>notcontains</name>
+ <value>;MANAGED-ID=$managed_id1:</value>
+ </arg>
+ </verify>
+ <grabheader>
+ <name>ETag</name>
+ <variable>$etag2:</variable>
+ </grabheader>
+ <grabcalproperty>
+ <name>VEVENT/ATTACH</name>
+ <variable>$attach2:</variable>
+ </grabcalproperty>
+ <grabcalparameter>
+ <name>VEVENT/ATTACH/MANAGED-ID</name>
+ <variable>$managed_id2:</variable>
+ </grabcalparameter>
+ <grabcalparameter>
+ <name>VEVENT/ATTACH/MTAG</name>
+ <variable>$mtag2:</variable>
+ </grabcalparameter>
+ <grabcalparameter>
+ <name>VEVENT/ATTACH/FILENAME</name>
+ <variable>$filename2:</variable>
+ </grabcalparameter>
+ <grabcalparameter>
+ <name>VEVENT/ATTACH/FMTTYPE</name>
+ <variable>$fmttype2:</variable>
+ </grabcalparameter>
+ <grabcalparameter>
+ <name>VEVENT/ATTACH/SIZE</name>
+ <variable>$size2:</variable>
+ </grabcalparameter>
+ </request>
+ </test>
+ <test name='7' ignore='no'>
+ <description>Check for attachment - sharer</description>
+ <request>
+ <method>GET</method>
+ <ruri>$attach2:</ruri>
+ <verify>
+ <callback>dataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/simple/2.txt</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='8' ignore='no'>
+ <description>Check for attachment - sharees</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GET</method>
+ <ruri>$attach2:</ruri>
+ <verify>
+ <callback>dataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/simple/2.txt</value>
+ </arg>
+ </verify>
+ </request>
+ <request user="$userid3:" pswd="$pswd3:">
+ <method>GET</method>
+ <ruri>$attach2:</ruri>
+ <verify>
+ <callback>dataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/simple/2.txt</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='9' ignore='no'>
+ <description>Check for attachment - non sharee</description>
+ <request user="$userid4:" pswd="$pswd4:">
+ <method>GET</method>
+ <ruri>$attach2:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='10' ignore='no'>
+ <description>Delete calendar data</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='11' ignore='no'>
+ <description>Delete calendar data</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/shared/2.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='No access after move'>
+ <test name='1' ignore='no'>
+ <description>PUT event</description>
+ <request end-delete='no'>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/managedattachments/sharing/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/sharing/1.ics</value>
+ </arg>
+ </verify>
+ <grabheader>
+ <name>ETag</name>
+ <variable>$etag:</variable>
+ </grabheader>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Sharer add attachment</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarhome1:/shared/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/sharing/2.txt</filepath>
+ </data>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/sharing/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>
+ </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 attachment - sharer</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='4' ignore='no'>
+ <description>Check for attachment - sharees</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <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>
+ <request user="$userid3:" pswd="$pswd3:">
+ <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>Check for attachment - non sharee</description>
+ <request user="$userid4:" pswd="$pswd4:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <description>Move</description>
+ <request print-response='no'>
+ <method>MOVE</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <header>
+ <name>Destination</name>
+ <value>$host:$calendarpath1:/move1.ics</value>
+ </header>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='7' ignore='no'>
+ <description>Check for attachment - sharer</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='8' ignore='no'>
+ <description>Check for attachment - sharees</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ <request user="$userid3:" pswd="$pswd3:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='9' ignore='no'>
+ <description>Check for attachment - non sharee</description>
+ <request user="$userid4:" pswd="$pswd4:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='10' ignore='no'>
+ <description>Delete calendar data</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarpath1:/move1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='11' ignore='no'>
+ <description>Check for attachment - sharer</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>
+
+ <test-suite name='No access after unshare'>
+ <test name='1' ignore='no'>
+ <description>PUT event</description>
+ <request end-delete='no'>
+ <method>PUT</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/managedattachments/sharing/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/sharing/1.ics</value>
+ </arg>
+ </verify>
+ <grabheader>
+ <name>ETag</name>
+ <variable>$etag:</variable>
+ </grabheader>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Sharer add attachment</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarhome1:/shared/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/sharing/2.txt</filepath>
+ </data>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/managedattachments/sharing/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>
+ </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 attachment - sharer</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='4' ignore='no'>
+ <description>Check for attachment - sharees</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <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>
+ <request user="$userid3:" pswd="$pswd3:">
+ <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>Check for attachment - non sharee</description>
+ <request user="$userid4:" pswd="$pswd4:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <description>Unshare</description>
+ <request print-response='no'>
+ <method>POST</method>
+ <ruri>$calendarhome1:/shared/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/POST/sharingremove23.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='7' ignore='no'>
+ <description>Check for attachment - sharer</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='8' ignore='no'>
+ <description>Check for attachment - sharees</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ <request user="$userid3:" pswd="$pswd3:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='9' ignore='no'>
+ <description>Check for attachment - non sharee</description>
+ <request user="$userid4:" pswd="$pswd4:">
+ <method>GET</method>
+ <ruri>$location:</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{DAV:}need-privileges</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='10' ignore='no'>
+ <description>Delete calendar data</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarhome1:/shared/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <end>
+ <request user="$useradmin:" pswd="$pswdadmin:">
+ <method>DELETEALL</method>
+ <ruri>$notificationpath1:/</ruri>
+ <ruri>$notificationpath2:/</ruri>
+ <ruri>$notificationpath3:/</ruri>
+ </request>
+ </end>
+
+</caldavtest>
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-12-04 02:01:59 UTC (rev 10120)
+++ CalDAVTester/branches/users/cdaboo/managed-attachments/scripts/tests/CalDAV/managed-attachments.xml 2012-12-04 16:47:12 UTC (rev 10121)
@@ -60,6 +60,37 @@
</test>
</test-suite>
+ <test-suite name="Privileges on Attachments Collection">
+ <test name='1' ignore='no'>
+ <description>Check for schedule privilege on iTIP Inbox</description>
+ <request print-response='no'>
+ <method>PROPFIND</method>
+ <ruri>$calendarhome1:/$attachments:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/PROPFIND/current-user-privilege-set.xml</filepath>
+ </data>
+ <verify>
+ <callback>aclItems</callback>
+ <arg>
+ <name>granted</name>
+ <value>{DAV:}read</value>
+ <value>{DAV:}read-current-user-privilege-set</value>
+ </arg>
+ <arg>
+ <name>denied</name>
+ <value>{DAV:}write</value>
+ <value>{DAV:}write-acl</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
<test-suite name='Simple non-recurring, non-scheduled add attachment no prefer'>
<test name='1' ignore='no'>
<description>PUT event</description>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20121204/c10f0289/attachment-0001.html>
More information about the calendarserver-changes
mailing list