[CalendarServer-changes] [11806] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Fri Oct 11 09:32:23 PDT 2013


Revision: 11806
          http://trac.calendarserver.org//changeset/11806
Author:   cdaboo at apple.com
Date:     2013-10-11 09:32:23 -0700 (Fri, 11 Oct 2013)
Log Message:
-----------
New "compound" WAITDELETEALL method added to allow for more efficient test files for scheduling.

Modified Paths:
--------------
    CalDAVTester/trunk/README.txt
    CalDAVTester/trunk/src/caldavtest.py

Modified: CalDAVTester/trunk/README.txt
===================================================================
--- CalDAVTester/trunk/README.txt	2013-10-10 20:50:39 UTC (rev 11805)
+++ CalDAVTester/trunk/README.txt	2013-10-11 16:32:23 UTC (rev 11806)
@@ -277,6 +277,8 @@
 				3) GETNEW - get the data from the newest resource in the collection specified by the <ruri> element and put its URI
 						    into the $ variable for later use in an <ruri> element.
 				4) WAITCOUNT - wait until at least a certain number of resources appear in a collection.
+				4) WAITDELETEALL - wait until at least a certain number of resources appear in a collection, then delete all child
+								   resources in that collection.
 	
 		ELEMENT <ruri>
 			the URI of the request. Multiple <ruri>'s are allowed with DELETEALL only.

Modified: CalDAVTester/trunk/src/caldavtest.py
===================================================================
--- CalDAVTester/trunk/src/caldavtest.py	2013-10-10 20:50:39 UTC (rev 11805)
+++ CalDAVTester/trunk/src/caldavtest.py	2013-10-11 16:32:23 UTC (rev 11806)
@@ -541,6 +541,17 @@
             else:
                 return False, "Count did not change", None, None
 
+        # Special check for WAITDELETEALL
+        elif req.method.startswith("WAITDELETEALL"):
+            count = int(req.method[len("WAITDELETEALL"):])
+            collection = (req.ruri, req.user, req.pswd)
+            if self.dowaitcount(collection, count, label=label):
+                hrefs = self.dofindall(collection, label="%s | %s" % (label, "DELETEALL"))
+                self.dodeleteall(hrefs, label="%s | %s" % (label, "DELETEALL"))
+                return True, "", None, None
+            else:
+                return False, "Count did not change", None, None
+
         result = True
         resulttxt = ""
         response = None
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20131011/e4820bfa/attachment.html>


More information about the calendarserver-changes mailing list