[CalendarServer-changes] [6799] CalDAVTester/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Tue Jan 25 08:07:58 PST 2011
Revision: 6799
http://trac.macosforge.org/projects/calendarserver/changeset/6799
Author: cdaboo at apple.com
Date: 2011-01-25 08:07:58 -0800 (Tue, 25 Jan 2011)
Log Message:
-----------
Changes to quota handling to add limits for calendar/address data and quota on attachments only.
Modified Paths:
--------------
CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml
CalDAVTester/trunk/scripts/server/serverinfo-template.xml
CalDAVTester/trunk/scripts/server/serverinfo.xml
CalDAVTester/trunk/scripts/server/sslserverinfo.xml
CalDAVTester/trunk/scripts/tests/CalDAV/calendaruserproxy.xml
CalDAVTester/trunk/scripts/tests/CalDAV/dropbox.xml
CalDAVTester/trunk/scripts/tests/CalDAV/implicitdropbox.xml
CalDAVTester/trunk/scripts/tests/CalDAV/quota.xml
CalDAVTester/trunk/scripts/tests/CalDAV/sharing-quota.xml
Added Paths:
-----------
CalDAVTester/trunk/Resource/Common/PROPFIND/max-collections.xml
CalDAVTester/trunk/Resource/Common/PROPFIND/max-resources.xml
CalDAVTester/trunk/scripts/tests/CalDAV/limits.xml
CalDAVTester/trunk/scripts/tests/CardDAV/limits.xml
Added: CalDAVTester/trunk/Resource/Common/PROPFIND/max-collections.xml
===================================================================
--- CalDAVTester/trunk/Resource/Common/PROPFIND/max-collections.xml (rev 0)
+++ CalDAVTester/trunk/Resource/Common/PROPFIND/max-collections.xml 2011-01-25 16:07:58 UTC (rev 6799)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:" xmlns:C="http://calendarserver.org/ns/">
+<D:prop>
+<C:max-collections/>
+</D:prop>
+</D:propfind>
Added: CalDAVTester/trunk/Resource/Common/PROPFIND/max-resources.xml
===================================================================
--- CalDAVTester/trunk/Resource/Common/PROPFIND/max-resources.xml (rev 0)
+++ CalDAVTester/trunk/Resource/Common/PROPFIND/max-resources.xml 2011-01-25 16:07:58 UTC (rev 6799)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:" xmlns:C="http://calendarserver.org/ns/">
+<D:prop>
+<C:max-resources/>
+</D:prop>
+</D:propfind>
Modified: CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml 2011-01-21 21:23:33 UTC (rev 6798)
+++ CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml 2011-01-25 16:07:58 UTC (rev 6799)
@@ -3,7 +3,7 @@
<!DOCTYPE serverinfo SYSTEM "serverinfo.dtd">
<!--
- Copyright (c) 2006-2010 Apple Inc. All rights reserved.
+ Copyright (c) 2006-2011 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.
@@ -42,7 +42,9 @@
<feature>directory listing</feature> <!-- GET on collection -->
<feature>extended-principal-search</feature> <!-- Extended principal-property-search REPORT extension -->
<feature>expand-property</feature> <!-- Expand property REPORT -->
+ <feature>limits</feature> <!-- max-collections and max-resources limits -->
<feature>quota</feature> <!-- WebDAV QUOTA -->
+ <feature>quota-on-resources</feature> <!-- WebDAV QUOTA on calendar and address book object resources -->
<feature>resource-id</feature> <!-- WebDAV BIND DAV:resource-id property -->
<feature>sync-report</feature> <!-- WebDAV collection sync REPORT -->
<feature>well-known</feature> <!-- well-known feature -->
Modified: CalDAVTester/trunk/scripts/server/serverinfo-template.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/serverinfo-template.xml 2011-01-21 21:23:33 UTC (rev 6798)
+++ CalDAVTester/trunk/scripts/server/serverinfo-template.xml 2011-01-25 16:07:58 UTC (rev 6799)
@@ -3,7 +3,7 @@
<!DOCTYPE serverinfo SYSTEM "serverinfo.dtd">
<!--
- Copyright (c) 2006-2010 Apple Inc. All rights reserved.
+ Copyright (c) 2006-2011 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.
@@ -42,7 +42,9 @@
<feature>directory listing</feature> <!-- GET on collection -->
<feature>extended-principal-search</feature> <!-- Extended principal-property-search REPORT extension -->
<feature>expand-property</feature> <!-- Expand property REPORT -->
+ <feature>limits</feature> <!-- max-collections and max-resources limits -->
<feature>quota</feature> <!-- WebDAV QUOTA -->
+ <feature>quota-on-resources</feature> <!-- WebDAV QUOTA on calendar and address book object resources -->
<feature>resource-id</feature> <!-- WebDAV BIND DAV:resource-id property -->
<feature>sync-report</feature> <!-- WebDAV collection sync REPORT -->
<feature>well-known</feature> <!-- well-known feature -->
Modified: CalDAVTester/trunk/scripts/server/serverinfo.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/serverinfo.xml 2011-01-21 21:23:33 UTC (rev 6798)
+++ CalDAVTester/trunk/scripts/server/serverinfo.xml 2011-01-25 16:07:58 UTC (rev 6799)
@@ -3,7 +3,7 @@
<!DOCTYPE serverinfo SYSTEM "serverinfo.dtd">
<!--
- Copyright (c) 2006-2010 Apple Inc. All rights reserved.
+ Copyright (c) 2006-2011 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.
@@ -42,7 +42,9 @@
<feature>directory listing</feature> <!-- GET on collection -->
<feature>extended-principal-search</feature> <!-- Extended principal-property-search REPORT extension -->
<feature>expand-property</feature> <!-- Expand property REPORT -->
+ <feature>limits</feature> <!-- max-collections and max-resources limits -->
<feature>quota</feature> <!-- WebDAV QUOTA -->
+ <!-- <feature>quota-on-resources</feature> --> <!-- WebDAV QUOTA on calendar and address book object resources -->
<feature>resource-id</feature> <!-- WebDAV BIND DAV:resource-id property -->
<feature>sync-report</feature> <!-- WebDAV collection sync REPORT -->
<feature>well-known</feature> <!-- well-known feature -->
Modified: CalDAVTester/trunk/scripts/server/sslserverinfo.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/sslserverinfo.xml 2011-01-21 21:23:33 UTC (rev 6798)
+++ CalDAVTester/trunk/scripts/server/sslserverinfo.xml 2011-01-25 16:07:58 UTC (rev 6799)
@@ -3,7 +3,7 @@
<!DOCTYPE serverinfo SYSTEM "serverinfo.dtd">
<!--
- Copyright (c) 2006-2010 Apple Inc. All rights reserved.
+ Copyright (c) 2006-2011 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.
@@ -43,7 +43,9 @@
<feature>directory listing</feature> <!-- GET on collection -->
<feature>extended-principal-search</feature> <!-- Extended principal-property-search REPORT extension -->
<feature>expand-property</feature> <!-- Expand property REPORT -->
+ <feature>limits</feature> <!-- max-collections and max-resources limits -->
<feature>quota</feature> <!-- WebDAV QUOTA -->
+ <feature>quota-on-resources</feature> <!-- WebDAV QUOTA on calendar and address book object resources -->
<feature>resource-id</feature> <!-- WebDAV BIND DAV:resource-id property -->
<feature>sync-report</feature> <!-- WebDAV collection sync REPORT -->
<feature>well-known</feature> <!-- well-known feature -->
Modified: CalDAVTester/trunk/scripts/tests/CalDAV/calendaruserproxy.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/calendaruserproxy.xml 2011-01-21 21:23:33 UTC (rev 6798)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/calendaruserproxy.xml 2011-01-25 16:07:58 UTC (rev 6799)
@@ -3,7 +3,7 @@
<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
<!--
- Copyright (c) 2006-2009 Apple Inc. All rights reserved.
+ Copyright (c) 2006-2011 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.
@@ -1449,6 +1449,13 @@
<description>Delete drop box</description>
<request user='$userid2:' pswd='$pswd2:'>
<method>DELETE</method>
+ <ruri>$dropboxpath1:/ABCEFG/test.xml</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ <request user='$userid2:' pswd='$pswd2:'>
+ <method>DELETE</method>
<ruri>$dropboxpath1:/ABCEFG/</ruri>
<verify>
<callback>statusCode</callback>
@@ -1500,6 +1507,22 @@
</test>
</test-suite>
- <end/>
+ <end>
+ <request>
+ <method>DELETEALL</method>
+ <ruri>$calendarpath1:/</ruri>
+ <ruri>$inboxpath1:/</ruri>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>DELETEALL</method>
+ <ruri>$calendarpath2:/</ruri>
+ <ruri>$inboxpath2:/</ruri>
+ </request>
+ <request user="$userid3:" pswd="$pswd3:">
+ <method>DELETEALL</method>
+ <ruri>$calendarpath3:/</ruri>
+ <ruri>$inboxpath3:/</ruri>
+ </request>
+ </end>
</caldavtest>
Modified: CalDAVTester/trunk/scripts/tests/CalDAV/dropbox.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/dropbox.xml 2011-01-21 21:23:33 UTC (rev 6798)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/dropbox.xml 2011-01-25 16:07:58 UTC (rev 6799)
@@ -3,7 +3,7 @@
<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
<!--
- Copyright (c) 2006-2010 Apple Inc. All rights reserved.
+ Copyright (c) 2006-2011 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
@@ -480,6 +480,20 @@
</verify>
</request>
</test>
+ <test name='3'>
+ <description>DELETE as authorized user</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$dropboxpath1:/ABCEFG/test.xml</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>204</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
</test-suite>
<test-suite name='Drop Box Home Restrictions'>
@@ -548,6 +562,22 @@
</test>
</test-suite>
- <end/>
+ <end>
+ <request>
+ <method>DELETEALL</method>
+ <ruri>$calendarpath1:/</ruri>
+ <ruri>$inboxpath1:/</ruri>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>DELETEALL</method>
+ <ruri>$calendarpath2:/</ruri>
+ <ruri>$inboxpath2:/</ruri>
+ </request>
+ <request user="$userid3:" pswd="$pswd3:">
+ <method>DELETEALL</method>
+ <ruri>$calendarpath3:/</ruri>
+ <ruri>$inboxpath3:/</ruri>
+ </request>
+ </end>
</caldavtest>
Modified: CalDAVTester/trunk/scripts/tests/CalDAV/implicitdropbox.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/implicitdropbox.xml 2011-01-21 21:23:33 UTC (rev 6798)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/implicitdropbox.xml 2011-01-25 16:07:58 UTC (rev 6799)
@@ -3,7 +3,7 @@
<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
<!--
- Copyright (c) 2006-2010 Apple Inc. All rights reserved.
+ Copyright (c) 2006-2011 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.
@@ -35,6 +35,16 @@
<method>GET</method>
<ruri>$calendarpath2:/</ruri>
</request>
+ <request user="$userid1:" pswd="$pswd1:">
+ <method>DELETEALL</method>
+ <ruri>$calendarpath1:/</ruri>
+ <ruri>$inboxpath1:/</ruri>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>DELETEALL</method>
+ <ruri>$calendarpath2:/</ruri>
+ <ruri>$inboxpath2:/</ruri>
+ </request>
</start>
<test-suite name='Simple dropbox' ignore='no'>
Added: CalDAVTester/trunk/scripts/tests/CalDAV/limits.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/limits.xml (rev 0)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/limits.xml 2011-01-25 16:07:58 UTC (rev 6799)
@@ -0,0 +1,111 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2011 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 ignore-all="no">
+ <description>Test Quota support on the server</description>
+
+ <require-feature>
+ <feature>caldav</feature>
+ <feature>limits</feature>
+ </require-feature>
+
+ <start/>
+
+ <test-suite name='Limits in properties' ignore='no'>
+ <test name='1'>
+ <description>max-collections property</description>
+ <request print-response='no'>
+ <method>PROPFIND</method>
+ <ruri>$pathprefix1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/PROPFIND/max-collections.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{http://calendarserver.org/ns/}max-collections[=50]</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>max-resources property</description>
+ <request print-response='no'>
+ <method>PROPFIND</method>
+ <ruri>$calendarpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/PROPFIND/max-resources.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{http://calendarserver.org/ns/}max-resources[=10000]</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Collection limit' ignore='no'>
+ <test name='1' count='48' ignore='no'>
+ <description>Create collections to one below the limit</description>
+ <request end-delete='yes' print-response='no'>
+ <method>MKCALENDAR</method>
+ <ruri>$pathprefix1:/caltest-##/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>201</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Create collections to one below the limit</description>
+ <request print-response='no'>
+ <method>MKCALENDAR</method>
+ <ruri>$pathprefix1:/caltest-49/</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{http://calendarserver.org/ns/}max-collections</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <end/>
+
+</caldavtest>
Modified: CalDAVTester/trunk/scripts/tests/CalDAV/quota.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/quota.xml 2011-01-21 21:23:33 UTC (rev 6798)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/quota.xml 2011-01-25 16:07:58 UTC (rev 6799)
@@ -3,7 +3,7 @@
<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
<!--
- Copyright (c) 2006-2010 Apple Inc. All rights reserved.
+ Copyright (c) 2006-2011 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.
@@ -315,6 +315,9 @@
<test name='3' ignore='no'>
<description>Quota check</description>
<request user="$userid2:" pswd="$pswd2:" print-response='no'>
+ <require-feature>
+ <feature>quota-on-resources</feature>
+ </require-feature>
<method>PROPFIND</method>
<ruri>$pathprefix2:/</ruri>
<header>
@@ -335,12 +338,36 @@
</arg>
</verify>
</request>
+ <request user="$userid2:" pswd="$pswd2:" print-response='no'>
+ <exclude-feature>
+ <feature>quota-on-resources</feature>
+ </exclude-feature>
+ <method>PROPFIND</method>
+ <ruri>$pathprefix2:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/quota/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}resourcetype</value>
+ <value>{DAV:}quota-available-bytes$104857600</value>
+ <value>{DAV:}quota-used-bytes$0</value>
+ </arg>
+ </verify>
+ </request>
</test>
</test-suite>
<test-suite name='Quota after non-empty collection delete' ignore='no'>
<test name='1' ignore='no'>
- <description>Create new calendar</description>
+ <description>Delete the calendar</description>
<request user="$userid2:" pswd="$pswd2:" print-response='no'>
<method>DELETE</method>
<ruri>$pathprefix2:/newcalendar/</ruri>
@@ -375,6 +402,233 @@
</test>
</test-suite>
- <end/>
+ <test-suite name='Quota on dropbox' ignore='no'>
+ <require-feature>
+ <feature>dropbox</feature>
+ </require-feature>
+ <test name='1' ignore='no'>
+ <description>Create event with attachment</description>
+ <request end-delete='yes'>
+ <method>PUT</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/dropbox/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>Create drop box</description>
+ <request end-delete='yes'>
+ <method>MKCOL</method>
+ <ruri>$dropboxpath1:/ABCEFG/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>201</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>Quota check</description>
+ <request print-response='no'>
+ <require-feature>
+ <feature>quota-on-resources</feature>
+ </require-feature>
+ <method>PROPFIND</method>
+ <ruri>$pathprefix1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/quota/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}resourcetype</value>
+ <value>{DAV:}quota-available-bytes$104856385</value>
+ <value>{DAV:}quota-used-bytes$1215</value>
+ </arg>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <exclude-feature>
+ <feature>quota-on-resources</feature>
+ </exclude-feature>
+ <method>PROPFIND</method>
+ <ruri>$pathprefix1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/quota/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}resourcetype</value>
+ <value>{DAV:}quota-available-bytes$104857600</value>
+ <value>{DAV:}quota-used-bytes$0</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>Create drop box resource</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$dropboxpath1:/ABCEFG/test.xml</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/dropbox/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='5' ignore='no'>
+ <description>Quota check</description>
+ <request print-response='no'>
+ <require-feature>
+ <feature>quota-on-resources</feature>
+ </require-feature>
+ <method>PROPFIND</method>
+ <ruri>$pathprefix1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/quota/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}resourcetype</value>
+ <value>{DAV:}quota-available-bytes$104856266</value>
+ <value>{DAV:}quota-used-bytes$1334</value>
+ </arg>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <exclude-feature>
+ <feature>quota-on-resources</feature>
+ </exclude-feature>
+ <method>PROPFIND</method>
+ <ruri>$pathprefix1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/quota/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}resourcetype</value>
+ <value>{DAV:}quota-available-bytes$104857481</value>
+ <value>{DAV:}quota-used-bytes$119</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6'>
+ <description>DELETE attachment</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$dropboxpath1:/ABCEFG/test.xml</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='7' ignore='no'>
+ <description>Quota check</description>
+ <request print-response='no'>
+ <require-feature>
+ <feature>quota-on-resources</feature>
+ </require-feature>
+ <method>PROPFIND</method>
+ <ruri>$pathprefix1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/quota/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}resourcetype</value>
+ <value>{DAV:}quota-available-bytes$104856385</value>
+ <value>{DAV:}quota-used-bytes$1215</value>
+ </arg>
+ </verify>
+ </request>
+ <request print-response='no'>
+ <exclude-feature>
+ <feature>quota-on-resources</feature>
+ </exclude-feature>
+ <method>PROPFIND</method>
+ <ruri>$pathprefix1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/quota/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>{DAV:}resourcetype</value>
+ <value>{DAV:}quota-available-bytes$104857600</value>
+ <value>{DAV:}quota-used-bytes$0</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <end>
+ <request>
+ <method>DELETEALL</method>
+ <ruri>$calendarpath1:/</ruri>
+ <ruri>$inboxpath1:/</ruri>
+ </request>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>DELETEALL</method>
+ <ruri>$calendarpath2:/</ruri>
+ <ruri>$inboxpath2:/</ruri>
+ </request>
+ <request user="$userid3:" pswd="$pswd3:">
+ <method>DELETEALL</method>
+ <ruri>$calendarpath3:/</ruri>
+ <ruri>$inboxpath3:/</ruri>
+ </request>
+ </end>
</caldavtest>
Modified: CalDAVTester/trunk/scripts/tests/CalDAV/sharing-quota.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/sharing-quota.xml 2011-01-21 21:23:33 UTC (rev 6798)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/sharing-quota.xml 2011-01-25 16:07:58 UTC (rev 6799)
@@ -3,7 +3,7 @@
<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
<!--
- Copyright (c) 2006-2010 Apple Inc. All rights reserved.
+ Copyright (c) 2006-2011 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.
@@ -24,6 +24,7 @@
<require-feature>
<feature>caldav</feature>
<feature>quota</feature>
+ <feature>quota-on-resources</feature>
<feature>shared-calendars</feature>
</require-feature>
Added: CalDAVTester/trunk/scripts/tests/CardDAV/limits.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CardDAV/limits.xml (rev 0)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/limits.xml 2011-01-25 16:07:58 UTC (rev 6799)
@@ -0,0 +1,119 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2011 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 ignore-all="no">
+ <description>Test Quota support on the server</description>
+
+ <require-feature>
+ <feature>caldav</feature>
+ <feature>limits</feature>
+ </require-feature>
+
+ <start/>
+
+ <test-suite name='Limits in properties' ignore='no'>
+ <test name='1'>
+ <description>max-collections property</description>
+ <request print-response='no'>
+ <method>PROPFIND</method>
+ <ruri>$addressbookhome1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/PROPFIND/max-collections.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{http://calendarserver.org/ns/}max-collections[=50]</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>max-resources property</description>
+ <request print-response='no'>
+ <method>PROPFIND</method>
+ <ruri>$addressbookpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/Common/PROPFIND/max-resources.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{http://calendarserver.org/ns/}max-resources[=10000]</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Collection limit' ignore='no'>
+ <test name='1' count='49' ignore='no'>
+ <description>Create collections to one below the limit</description>
+ <request end-delete='yes' print-response='no'>
+ <method>MKCOL</method>
+ <ruri>$addressbookhome1:/adbktest-##/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/mkcol/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>201</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Create collections to one below the limit</description>
+ <request print-response='no'>
+ <method>MKCOL</method>
+ <ruri>$addressbookhome1:/adbktest-50/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/CardDAV/mkcol/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>{http://calendarserver.org/ns/}max-collections</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/20110125/123afab5/attachment-0001.html>
More information about the calendarserver-changes
mailing list