[CalendarServer-changes] [4154] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Sun May 3 09:50:29 PDT 2009


Revision: 4154
          http://trac.macosforge.org/projects/calendarserver/changeset/4154
Author:   cdaboo at apple.com
Date:     2009-05-03 09:50:29 -0700 (Sun, 03 May 2009)
Log Message:
-----------
Tweaks to allow sub-setting the tests for OS X server specific default configuration.

Modified Paths:
--------------
    CalDAVTester/trunk/Resource/schedule/23.ics
    CalDAVTester/trunk/odsetup.py
    CalDAVTester/trunk/scripts/tests/errors.xml
    CalDAVTester/trunk/src/manager.py

Added Paths:
-----------
    CalDAVTester/trunk/QuickLook
    CalDAVTester/trunk/Validation
    CalDAVTester/trunk/scripts/tests/errors-big-calendars.xml

Added: CalDAVTester/trunk/QuickLook
===================================================================
--- CalDAVTester/trunk/QuickLook	                        (rev 0)
+++ CalDAVTester/trunk/QuickLook	2009-05-03 16:50:29 UTC (rev 4154)
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+##
+# Copyright (c) 2009 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.
+##
+#
+# Runs a subset of tests as a quick check that the server is functional
+#
+
+export PYTHONPATH=/usr/share/caldavd/lib/python
+./testcaldav.py caldavIOP.xml errors.xml get.xml ical-client.xml propfind.xml put.xml quota.xml reports.xml

Modified: CalDAVTester/trunk/Resource/schedule/23.ics
===================================================================
--- CalDAVTester/trunk/Resource/schedule/23.ics	2009-05-03 02:56:28 UTC (rev 4153)
+++ CalDAVTester/trunk/Resource/schedule/23.ics	2009-05-03 16:50:29 UTC (rev 4154)
@@ -6,7 +6,7 @@
 BEGIN:VFREEBUSY
 UID:20060110T231240Z-4011c71-187-6f73-fb
 ORGANIZER;CN=$username1::$cuaddr1:
-ATTENDEE;CN=$username2::mailto:broken at example.com
+ATTENDEE;CN=$username2::urn:uuid:1234-56789
 ATTENDEE;CN=$username3::$cuaddr3:
 DTSTART:20060101T000000Z
 DTSTAMP:20060309T185105Z

Added: CalDAVTester/trunk/Validation
===================================================================
--- CalDAVTester/trunk/Validation	                        (rev 0)
+++ CalDAVTester/trunk/Validation	2009-05-03 16:50:29 UTC (rev 4154)
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+##
+# Copyright (c) 2009 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.
+##
+#
+# Runs a full set of tests to verify that the server is functional
+#
+
+export PYTHONPATH=/usr/share/caldavd/lib/python
+./testcaldav.py --all \
+ 	--exclude directory.xml \
+ 	--exclude errors-big-calendars.xml \
+ 	--exclude proxyauthz.xml
+ 	
\ No newline at end of file

Modified: CalDAVTester/trunk/odsetup.py
===================================================================
--- CalDAVTester/trunk/odsetup.py	2009-05-03 02:56:28 UTC (rev 4153)
+++ CalDAVTester/trunk/odsetup.py	2009-05-03 16:50:29 UTC (rev 4154)
@@ -31,6 +31,7 @@
 diradmin_pswd    = "admin"
 directory_node   = "/LDAPv3/127.0.0.1"
 config           = "/etc/caldavd/caldavd.plist"
+utility          = "/usr/sbin/caldav_utility"
 
 serverinfo_default  = "scripts/server/serverinfo.xml"
 serverinfo_template = "scripts/server/serverinfo-template.xml"
@@ -92,10 +93,6 @@
 <dict>
     <key>com.apple.WhitePagesFramework</key>
     <dict>
-        <key>AutoAcceptsInvitation</key>
-        <true/>
-        <key>CalendaringDelegate</key>
-        <string>%(guid)s</string>
         <key>Label</key>
         <string>Room</string>
     </dict>
@@ -113,12 +110,6 @@
 <dict>
     <key>com.apple.WhitePagesFramework</key>
     <dict>
-        <key>AutoAcceptsInvitation</key>
-        <true/>
-        <key>CalendaringDelegate</key>
-        <string>%(guid)s</string>
-        <key>ReadOnlyCalendaringDelegate</key>
-        <string>%(readonlyguid)s</string>
         <key>Label</key>
         <string>Printer</string>
     </dict>
@@ -148,7 +139,7 @@
     -u uid   OpenDirectory Admin user id
     -p pswd  OpenDirectory Admin user password
     -f file  caldavd.plist config file used by the server
-    -c users number of user accounts to create (default: 5)
+    -c users number of user accounts to create (default: 10)
 """
 
 def readConfig(config):
@@ -366,6 +357,24 @@
         result = commands.getoutput(cmd)
         guid = result.split()[1]
         guids[user[0]] = guid
+        
+    # Do caldav_utility setup
+    if path in ("/Places", "/Resources",):
+        if path in ("/Places",):
+            cmd = "%s --resource %s --add-write-delegate %s --set-auto-schedule true" % (
+                utility,
+                guids[user[0]],
+                guids["user01"],
+            )
+        else:
+            cmd = "%s --resource %s --add-write-delegate %s --add-read-delegate %s --set-auto-schedule true" % (
+                utility,
+                guids[user[0]],
+                guids["user01"],
+                guids["user03"],
+            )
+        print cmd
+        commands.getoutput(cmd)
 
 def removeUser(path, user):
     # Do dscl command line operations to create a calendar user

Added: CalDAVTester/trunk/scripts/tests/errors-big-calendars.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/errors-big-calendars.xml	                        (rev 0)
+++ CalDAVTester/trunk/scripts/tests/errors-big-calendars.xml	2009-05-03 16:50:29 UTC (rev 4154)
@@ -0,0 +1,96 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2009 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>Tests of various pre-/post-conditions with large calendars</description>
+
+	<start/>
+	
+	<test-suite name='REPORT/too big' ignore='no'>
+		<test name='1'>
+			<description>add one event to make it a 1001 event calendar</description>
+			<request end-delete="yes" print-response='no'>
+				<method>PUT</method>
+				<ruri>$pathprefix1:/calendar.1000/abc.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/errors/6.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+			<request print-response='no'>
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/calendar.1000/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/errors/23.xml</filepath>
+				</data>
+				<verify>
+					<callback>prepostcondition</callback>
+					<arg>
+						<name>error</name>
+						<value>DAV:number-of-matches-within-limits</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>multiget with too many results</description>
+			<request print-response='no'>
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/calendar.1000/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/errors/24.xml</filepath>
+				</data>
+				<verify>
+					<callback>prepostcondition</callback>
+					<arg>
+						<name>error</name>
+						<value>DAV:number-of-matches-within-limits</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>free-busy with too many results</description>
+			<request print-response='no'>
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/calendar.1000/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/errors/25.xml</filepath>
+				</data>
+				<verify>
+					<callback>prepostcondition</callback>
+					<arg>
+						<name>error</name>
+						<value>DAV:number-of-matches-within-limits</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
+	<end/>
+	
+</caldavtest>

Modified: CalDAVTester/trunk/scripts/tests/errors.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/errors.xml	2009-05-03 02:56:28 UTC (rev 4153)
+++ CalDAVTester/trunk/scripts/tests/errors.xml	2009-05-03 16:50:29 UTC (rev 4154)
@@ -3,7 +3,7 @@
 <!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
 
 <!--
- Copyright (c) 2006-2008 Apple Inc. All rights reserved.
+ Copyright (c) 2006-2009 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.
@@ -1205,74 +1205,6 @@
 		</test>
 	</test-suite>
 
-	<test-suite name='REPORT/too big' ignore='no'>
-		<test name='1'>
-			<description>add one event to make it a 1001 event calendar</description>
-			<request end-delete="yes" print-response='no'>
-				<method>PUT</method>
-				<ruri>$pathprefix1:/calendar.1000/abc.ics</ruri>
-				<data>
-					<content-type>text/calendar; charset=utf-8</content-type>
-					<filepath>Resource/errors/6.ics</filepath>
-				</data>
-				<verify>
-					<callback>statusCode</callback>
-				</verify>
-			</request>
-			<request print-response='no'>
-				<method>REPORT</method>
-				<ruri>$pathprefix1:/calendar.1000/</ruri>
-				<data>
-					<content-type>text/xml; charset=utf-8</content-type>
-					<filepath>Resource/errors/23.xml</filepath>
-				</data>
-				<verify>
-					<callback>prepostcondition</callback>
-					<arg>
-						<name>error</name>
-						<value>DAV:number-of-matches-within-limits</value>
-					</arg>
-				</verify>
-			</request>
-		</test>
-		<test name='2'>
-			<description>multiget with too many results</description>
-			<request print-response='no'>
-				<method>REPORT</method>
-				<ruri>$pathprefix1:/calendar.1000/</ruri>
-				<data>
-					<content-type>text/xml; charset=utf-8</content-type>
-					<filepath>Resource/errors/24.xml</filepath>
-				</data>
-				<verify>
-					<callback>prepostcondition</callback>
-					<arg>
-						<name>error</name>
-						<value>DAV:number-of-matches-within-limits</value>
-					</arg>
-				</verify>
-			</request>
-		</test>
-		<test name='3'>
-			<description>free-busy with too many results</description>
-			<request print-response='no'>
-				<method>REPORT</method>
-				<ruri>$pathprefix1:/calendar.1000/</ruri>
-				<data>
-					<content-type>text/xml; charset=utf-8</content-type>
-					<filepath>Resource/errors/25.xml</filepath>
-				</data>
-				<verify>
-					<callback>prepostcondition</callback>
-					<arg>
-						<name>error</name>
-						<value>DAV:number-of-matches-within-limits</value>
-					</arg>
-				</verify>
-			</request>
-		</test>
-	</test-suite>
-	
 	<test-suite name='Invalid CalDAV:timezone' ignore='no'>
 		<test name='1'>
 			<description>query with invalid timezone</description>
@@ -1385,6 +1317,7 @@
 			</request>
 		</test>
 	</test-suite>
+
 	<end/>
 	
 </caldavtest>

Modified: CalDAVTester/trunk/src/manager.py
===================================================================
--- CalDAVTester/trunk/src/manager.py	2009-05-03 02:56:28 UTC (rev 4153)
+++ CalDAVTester/trunk/src/manager.py	2009-05-03 16:50:29 UTC (rev 4154)
@@ -1,5 +1,5 @@
 ##
-# Copyright (c) 2006-2007 Apple Inc. All rights reserved.
+# Copyright (c) 2006-2009 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.
@@ -141,9 +141,10 @@
         dname = "scripts/tests"
         fnames = []
         all = False
+        excludes = set()
         pidfile = "../CalendarServer/logs/caldavd.pid"
         random_order = False
-        options, args = getopt.getopt(sys.argv[1:], "s:p:dmx:", ["all", "pid=", "random"])
+        options, args = getopt.getopt(sys.argv[1:], "s:p:dmx:", ["all", "exclude=", "pid=", "random"])
         
         # Process single options
         for option, value in options:
@@ -157,6 +158,8 @@
                 dname = value
             elif option == "--all":
                 all = True
+            elif option == "--exclude":
+                excludes.add(value)
             elif option == "-m":
                 self.memUsage = True
             elif option == "--pid":
@@ -167,7 +170,7 @@
         if all:
             files = os.listdir(dname)
             for file in files:
-                if file.endswith(".xml"):
+                if file.endswith(".xml") and file not in excludes:
                     fnames.append(dname + "/" + file)
 
         # Remove any server info file from files enuerated by --all
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090503/ec9ce182/attachment-0001.html>


More information about the calendarserver-changes mailing list