[CalendarServer-changes] [4536] CalDAVTester/branches/users/cdaboo/deployment

source_changes at macosforge.org source_changes at macosforge.org
Mon Sep 14 17:31:03 PDT 2009


Revision: 4536
          http://trac.macosforge.org/projects/calendarserver/changeset/4536
Author:   cdaboo at apple.com
Date:     2009-09-14 17:31:02 -0700 (Mon, 14 Sep 2009)
Log Message:
-----------
Test to make sure proxies have current-user-privilege-set granted too.

Modified Paths:
--------------
    CalDAVTester/branches/users/cdaboo/deployment/scripts/tests/calendaruserproxy.xml
    CalDAVTester/branches/users/cdaboo/deployment/verifiers/propfindValues.py

Added Paths:
-----------
    CalDAVTester/branches/users/cdaboo/deployment/Resource/calendaruserproxy/13.xml

Added: CalDAVTester/branches/users/cdaboo/deployment/Resource/calendaruserproxy/13.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/deployment/Resource/calendaruserproxy/13.xml	                        (rev 0)
+++ CalDAVTester/branches/users/cdaboo/deployment/Resource/calendaruserproxy/13.xml	2009-09-15 00:31:02 UTC (rev 4536)
@@ -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/deployment/scripts/tests/calendaruserproxy.xml
===================================================================
--- CalDAVTester/branches/users/cdaboo/deployment/scripts/tests/calendaruserproxy.xml	2009-09-15 00:18:21 UTC (rev 4535)
+++ CalDAVTester/branches/users/cdaboo/deployment/scripts/tests/calendaruserproxy.xml	2009-09-15 00:31:02 UTC (rev 4536)
@@ -698,7 +698,7 @@
 		</test>
 	</test-suite>
 
-	<test-suite name='Principal report'>
+	<test-suite name='Principal report' ignore='no'>
 		<test name='1'>
 			<description>Add user02 and user03 as read-write proxy for user01</description>
 			<request print-response="no">
@@ -784,7 +784,7 @@
 		</test>
 	</test-suite>
 	
-	<test-suite name='Proxy For properties'>
+	<test-suite name='Proxy For properties' ignore='no'>
 		<test name='1'>
 			<description>Default setup</description>
 			<request print-response="no">
@@ -896,7 +896,7 @@
 		</test>
 	</test-suite>
 	
-	<test-suite name='Expand properties'>
+	<test-suite name='Expand properties' ignore='no'>
 		<test name='1'>
 			<description>OK property query</description>
 			<request print-response="no">
@@ -1025,6 +1025,248 @@
 		</test>
 	</test-suite>
 
+	<test-suite name='Calendar home acls' ignore='no'>
+		<test name='1'>
+			<description>Add user02 as read proxy for user01</description>
+			<request print-response="no">
+				<method>PROPPATCH</method>
+				<ruri>$principal1:calendar-proxy-read/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/calendaruserproxy/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:group-member-set</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Look for proxy principals</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>PROPFIND</method>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<ruri>$pathprefix:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/calendaruserproxy/13.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>props</name>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<read/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*<write/>.*]]></value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Clear user02 as read-only proxy for user01</description>
+			<request print-response="no">
+				<method>PROPPATCH</method>
+				<ruri>$principal1:calendar-proxy-read/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/calendaruserproxy/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:group-member-set</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4'>
+			<description>Add user02 as read-write proxy for user01</description>
+			<request print-response="no">
+				<method>PROPPATCH</method>
+				<ruri>$principal1:calendar-proxy-write/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/calendaruserproxy/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:group-member-set</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='5'>
+			<description>Look for proxy principals</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>PROPFIND</method>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<ruri>$pathprefix:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/calendaruserproxy/13.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>props</name>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<read/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<write/>.*]]></value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='6'>
+			<description>Clear user02 as read-write proxy for user01</description>
+			<request print-response="no">
+				<method>PROPPATCH</method>
+				<ruri>$principal1:calendar-proxy-write/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/calendaruserproxy/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:group-member-set</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<test-suite name='Calendar acls' ignore='no'>
+		<test name='1'>
+			<description>Add user02 as read proxy for user01</description>
+			<request print-response="no">
+				<method>PROPPATCH</method>
+				<ruri>$principal1:calendar-proxy-read/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/calendaruserproxy/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:group-member-set</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>Look for proxy principals</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>PROPFIND</method>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<ruri>$calendarpath1:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/calendaruserproxy/13.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>props</name>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<read/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set!.*<write/>.*]]></value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>Clear user02 as read-only proxy for user01</description>
+			<request print-response="no">
+				<method>PROPPATCH</method>
+				<ruri>$principal1:calendar-proxy-read/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/calendaruserproxy/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:group-member-set</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4'>
+			<description>Add user02 as read-write proxy for user01</description>
+			<request print-response="no">
+				<method>PROPPATCH</method>
+				<ruri>$principal1:calendar-proxy-write/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/calendaruserproxy/3.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:group-member-set</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='5'>
+			<description>Look for proxy principals</description>
+			<request user="$userid2:" pswd="$pswd2:" print-response="no">
+				<method>PROPFIND</method>
+				<header>
+					<name>Depth</name>
+					<value>0</value>
+				</header>
+				<ruri>$calendarpath1:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/calendaruserproxy/13.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindValues</callback>
+					<arg>
+						<name>props</name>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<read/>.*]]></value>
+						<value><![CDATA[DAV:current-user-privilege-set$.*<write/>.*]]></value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='6'>
+			<description>Clear user02 as read-write proxy for user01</description>
+			<request print-response="no">
+				<method>PROPPATCH</method>
+				<ruri>$principal1:calendar-proxy-write/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/calendaruserproxy/4.xml</filepath>
+				</data>
+				<verify>
+					<callback>propfindItems</callback>
+					<arg>
+						<name>okprops</name>
+						<value>DAV:group-member-set</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
 	<end/>
 
 </caldavtest>

Modified: CalDAVTester/branches/users/cdaboo/deployment/verifiers/propfindValues.py
===================================================================
--- CalDAVTester/branches/users/cdaboo/deployment/verifiers/propfindValues.py	2009-09-15 00:18:21 UTC (rev 4535)
+++ CalDAVTester/branches/users/cdaboo/deployment/verifiers/propfindValues.py	2009-09-15 00:31:02 UTC (rev 4536)
@@ -127,6 +127,10 @@
                 if propname not in ok_status_props:
                     resulttxt += "        Items not returned in report (OK) for %s: %s\n" % (href, propname,)
                     result = False
+                if propname not in ok_status_props:
+                    resulttxt += "        Items missing for %s: %s\n" % (href, propname)
+                    result = False
+                    continue
                 matched = re.match(value, ok_status_props[propname])
                 if match and not matched:
                     resulttxt += "        Items not matching for %s: %s %s\n" % (href, propname, ok_status_props[propname])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090914/e35fdb34/attachment-0001.html>


More information about the calendarserver-changes mailing list