[CalendarServer-changes] [10081] CalendarServer/branches/release/CalendarServer-4.2-dev/contrib/ migration
source_changes at macosforge.org
source_changes at macosforge.org
Sat Nov 17 17:45:34 PST 2012
Revision: 10081
http://trac.calendarserver.org//changeset/10081
Author: sagen at apple.com
Date: 2012-11-17 17:45:34 -0800 (Sat, 17 Nov 2012)
Log Message:
-----------
Make plist changes in migration extra because that's the script that starts the service initially (common extra is too late)
Modified Paths:
--------------
CalendarServer/branches/release/CalendarServer-4.2-dev/contrib/migration/calendarmigrator.py
CalendarServer/branches/release/CalendarServer-4.2-dev/contrib/migration/test/test_migrator.py
Modified: CalendarServer/branches/release/CalendarServer-4.2-dev/contrib/migration/calendarmigrator.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-4.2-dev/contrib/migration/calendarmigrator.py 2012-11-17 05:27:37 UTC (rev 10080)
+++ CalendarServer/branches/release/CalendarServer-4.2-dev/contrib/migration/calendarmigrator.py 2012-11-18 01:45:34 UTC (rev 10081)
@@ -485,6 +485,16 @@
# ConfigRoot is now always "Config"
combined["ConfigRoot"] = "Config"
+ # Remove the RunRoot, PIDFile keys so they use new defaults
+ try:
+ del combined["RunRoot"]
+ except:
+ pass
+ try:
+ del combined["PIDFile"]
+ except:
+ pass
+
return adminChanges
Modified: CalendarServer/branches/release/CalendarServer-4.2-dev/contrib/migration/test/test_migrator.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-4.2-dev/contrib/migration/test/test_migrator.py 2012-11-17 05:27:37 UTC (rev 10080)
+++ CalendarServer/branches/release/CalendarServer-4.2-dev/contrib/migration/test/test_migrator.py 2012-11-18 01:45:34 UTC (rev 10081)
@@ -63,6 +63,34 @@
self.patch(contrib.migration.calendarmigrator, "grp", FakeGrp())
+ def test_keyRemoval(self):
+
+ oldCalDAV = {
+ "RunRoot": "xyzzy",
+ "PIDFile": "plugh",
+ "ignored": "ignored",
+ }
+ oldCardDAV = {
+ }
+ expected = {
+ "ignored": "ignored",
+ "BindHTTPPorts": [8008, 8800],
+ "BindSSLPorts": [8443, 8843],
+ "ConfigRoot" : "Config",
+ "DSN" : "/Library/Server/PostgreSQL For Server Services/Socket:caldav:caldav:::",
+ "EnableSSL" : False,
+ "HTTPPort": 8008,
+ "RedirectHTTPToHTTPS": False,
+ "SSLAuthorityChain": "",
+ "SSLCertificate": "",
+ "SSLPort": 8443,
+ "SSLPrivateKey": "",
+ }
+ newCombined = { }
+ adminChanges = mergePlist(oldCalDAV, oldCardDAV, newCombined)
+ self.assertEquals(adminChanges, [])
+ self.assertEquals(newCombined, expected)
+
def test_mergeSSL(self):
# SSL on for both services
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20121117/92fa0022/attachment.html>
More information about the calendarserver-changes
mailing list