[CalendarServer-changes] [13978] CalendarServer/trunk/calendarserver/tap
source_changes at macosforge.org
source_changes at macosforge.org
Thu Sep 18 07:36:43 PDT 2014
Revision: 13978
http://trac.calendarserver.org//changeset/13978
Author: cdaboo at apple.com
Date: 2014-09-18 07:36:43 -0700 (Thu, 18 Sep 2014)
Log Message:
-----------
Whitespace.
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tap/test/test_util.py
CalendarServer/trunk/calendarserver/tap/util.py
Modified: CalendarServer/trunk/calendarserver/tap/test/test_util.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/test/test_util.py 2014-09-18 14:34:36 UTC (rev 13977)
+++ CalendarServer/trunk/calendarserver/tap/test/test_util.py 2014-09-18 14:36:43 UTC (rev 13978)
@@ -235,13 +235,14 @@
['one success', 'two failure', 'three success', 'four failure'])
+
class PreFlightChecksTestCase(TestCase):
"""
Verify that missing, empty, or bogus TLS Certificates are detected
"""
def test_missingCertificate(self):
- success, reason = verifyTLSCertificate(
+ success, _ignore_reason = verifyTLSCertificate(
ConfigDict(
{
"SSLCertificate": "missing",
@@ -254,7 +255,7 @@
def test_emptyCertificate(self):
certFilePath = FilePath(self.mktemp())
certFilePath.setContent("")
- success, reason = verifyTLSCertificate(
+ success, _ignore_reason = verifyTLSCertificate(
ConfigDict(
{
"SSLCertificate": certFilePath.path,
@@ -269,7 +270,7 @@
certFilePath.setContent("bogus")
keyFilePath = FilePath(self.mktemp())
keyFilePath.setContent("bogus")
- success, reason = verifyTLSCertificate(
+ success, _ignore_reason = verifyTLSCertificate(
ConfigDict(
{
"SSLCertificate": certFilePath.path,
Modified: CalendarServer/trunk/calendarserver/tap/util.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/util.py 2014-09-18 14:34:36 UTC (rev 13977)
+++ CalendarServer/trunk/calendarserver/tap/util.py 2014-09-18 14:36:43 UTC (rev 13978)
@@ -1115,6 +1115,7 @@
return self.deferred
+
def requestShutdown(programPath, reason):
"""
Log the shutdown reason and call the shutdown-requesting program.
@@ -1140,6 +1141,7 @@
).communicate()
+
def preFlightChecks(config):
"""
Perform checks prior to spawning any processes. Returns True if the checks
@@ -1176,6 +1178,7 @@
return True
+
def verifyConfig(config):
"""
At least one of EnableCalDAV or EnableCardDAV must be True
@@ -1187,6 +1190,7 @@
return False, "Neither CalDAV nor CardDAV are enabled"
+
def verifyTLSCertificate(config):
"""
If a TLS certificate is configured, make sure it exists, is non empty,
@@ -1234,6 +1238,7 @@
return True, "TLS enabled"
+
def verifyAPNSCertificate(config):
"""
If APNS certificates are configured, make sure they're valid.
@@ -1282,6 +1287,7 @@
return True, "APNS disabled"
+
def getSSLPassphrase(*ignored):
if not config.SSLPrivateKey:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140918/e81e6a99/attachment-0001.html>
More information about the calendarserver-changes
mailing list