[CalendarServer-changes] [11137] CalendarServer/trunk/calendarserver/tools/test
source_changes at macosforge.org
source_changes at macosforge.org
Mon May 6 10:01:04 PDT 2013
Revision: 11137
http://trac.calendarserver.org//changeset/11137
Author: sagen at apple.com
Date: 2013-05-06 10:01:04 -0700 (Mon, 06 May 2013)
Log Message:
-----------
When running test_gateway and test_principals, have the spawned tools re-use the long-lived postgres
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/test/gateway/caldavd.plist
CalendarServer/trunk/calendarserver/tools/test/principals/caldavd.plist
CalendarServer/trunk/calendarserver/tools/test/test_gateway.py
CalendarServer/trunk/calendarserver/tools/test/test_principals.py
Modified: CalendarServer/trunk/calendarserver/tools/test/gateway/caldavd.plist
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/gateway/caldavd.plist 2013-05-04 17:36:05 UTC (rev 11136)
+++ CalendarServer/trunk/calendarserver/tools/test/gateway/caldavd.plist 2013-05-06 17:01:04 UTC (rev 11137)
@@ -85,6 +85,10 @@
<key>ServerRoot</key>
<string>%(ServerRoot)s</string>
+ <!-- Database root -->
+ <key>DatabaseRoot</key>
+ <string>%(DatabaseRoot)s</string>
+
<!-- Data root -->
<key>DataRoot</key>
<string>Data</string>
Modified: CalendarServer/trunk/calendarserver/tools/test/principals/caldavd.plist
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/principals/caldavd.plist 2013-05-04 17:36:05 UTC (rev 11136)
+++ CalendarServer/trunk/calendarserver/tools/test/principals/caldavd.plist 2013-05-06 17:01:04 UTC (rev 11137)
@@ -81,6 +81,10 @@
<key>DataRoot</key>
<string>%(DataRoot)s</string>
+ <!-- Database root -->
+ <key>DatabaseRoot</key>
+ <string>%(DatabaseRoot)s</string>
+
<!-- Document root -->
<key>DocumentRoot</key>
<string>%(DocumentRoot)s</string>
Modified: CalendarServer/trunk/calendarserver/tools/test/test_gateway.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_gateway.py 2013-05-04 17:36:05 UTC (rev 11136)
+++ CalendarServer/trunk/calendarserver/tools/test/test_gateway.py 2013-05-06 17:01:04 UTC (rev 11137)
@@ -27,6 +27,7 @@
from twistedcaldav.config import config
from twistedcaldav.test.util import TestCase, CapturingProcessProtocol
from calendarserver.tools.util import getDirectory
+from txdav.common.datastore.test.util import SQLStoreBuilder
class RunCommandTestCase(TestCase):
@@ -40,8 +41,11 @@
template = templateFile.read()
templateFile.close()
+ # Use the same DatabaseRoot as the SQLStoreBuilder
+ databaseRoot = os.path.abspath(SQLStoreBuilder.SHARED_DB_PATH)
newConfig = template % {
"ServerRoot" : os.path.abspath(config.ServerRoot),
+ "DatabaseRoot" : databaseRoot,
"WritablePlist" : os.path.join(os.path.abspath(config.ConfigRoot), "caldavd-writable.plist"),
}
configFilePath = FilePath(os.path.join(config.ConfigRoot, "caldavd.plist"))
Modified: CalendarServer/trunk/calendarserver/tools/test/test_principals.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_principals.py 2013-05-04 17:36:05 UTC (rev 11136)
+++ CalendarServer/trunk/calendarserver/tools/test/test_principals.py 2013-05-06 17:01:04 UTC (rev 11137)
@@ -31,6 +31,7 @@
from calendarserver.tap.util import directoryFromConfig
from calendarserver.tools.principals import (parseCreationArgs, matchStrings,
updateRecord, principalForPrincipalID, getProxies, setProxies)
+from txdav.common.datastore.test.util import SQLStoreBuilder
class ManagePrincipalsTestCase(TestCase):
@@ -49,9 +50,13 @@
template = templateFile.read()
templateFile.close()
+ # Use the same DatabaseRoot as the SQLStoreBuilder
+ databaseRoot = os.path.abspath(SQLStoreBuilder.SHARED_DB_PATH)
+
newConfig = template % {
"ServerRoot" : os.path.abspath(config.ServerRoot),
"DataRoot" : os.path.abspath(config.DataRoot),
+ "DatabaseRoot" : databaseRoot,
"DocumentRoot" : os.path.abspath(config.DocumentRoot),
"LogRoot" : os.path.abspath(config.LogRoot),
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130506/2306c7b1/attachment.html>
More information about the calendarserver-changes
mailing list