Commit 4d7a8452 authored by Jason Madden's avatar Jason Madden

Disable failing SSL tests.

The cert for svn.python.org has changed breaking many test_ssl.py cases.

The upstream resolution is being discussed in
https://bugs.python.org/issue25940, but the interim solution was to
disable the failing tests to avoid blocking releases. I'm applying the
same approach here for a temporary fix.
parent 7feb7da1
...@@ -113,6 +113,9 @@ class BasicTests(unittest.TestCase): ...@@ -113,6 +113,9 @@ class BasicTests(unittest.TestCase):
class NetworkedTests(unittest.TestCase): class NetworkedTests(unittest.TestCase):
def test_connect(self): def test_connect(self):
if True:
print "svn.python.org cert changed; see https://bugs.python.org/issue25940"
return
s = ssl.wrap_socket(socket.socket(socket.AF_INET), s = ssl.wrap_socket(socket.socket(socket.AF_INET),
cert_reqs=ssl.CERT_NONE) cert_reqs=ssl.CERT_NONE)
s.connect(("svn.python.org", 443)) s.connect(("svn.python.org", 443))
...@@ -190,6 +193,9 @@ class NetworkedTests(unittest.TestCase): ...@@ -190,6 +193,9 @@ class NetworkedTests(unittest.TestCase):
sys.stdout.write("\nNeeded %d calls to do_handshake() to establish session.\n" % count) sys.stdout.write("\nNeeded %d calls to do_handshake() to establish session.\n" % count)
def test_get_server_certificate(self): def test_get_server_certificate(self):
if True:
print "svn.python.org cert changed; see https://bugs.python.org/issue25940"
return
pem = ssl.get_server_certificate(("svn.python.org", 443)) pem = ssl.get_server_certificate(("svn.python.org", 443))
if not pem: if not pem:
self.fail("No server certificate on svn.python.org:443!") self.fail("No server certificate on svn.python.org:443!")
......
...@@ -234,6 +234,7 @@ class BasicSocketTests(unittest.TestCase): ...@@ -234,6 +234,7 @@ class BasicSocketTests(unittest.TestCase):
class NetworkedTests(unittest.TestCase): class NetworkedTests(unittest.TestCase):
@unittest.skipIf(True, "svn.python.org cert changed; see https://bugs.python.org/issue25940")
def test_connect(self): def test_connect(self):
with test_support.transient_internet("svn.python.org"): with test_support.transient_internet("svn.python.org"):
s = ssl.wrap_socket(socket.socket(socket.AF_INET), s = ssl.wrap_socket(socket.socket(socket.AF_INET),
...@@ -263,6 +264,7 @@ class NetworkedTests(unittest.TestCase): ...@@ -263,6 +264,7 @@ class NetworkedTests(unittest.TestCase):
finally: finally:
s.close() s.close()
@unittest.skipIf(True, "svn.python.org cert changed; see https://bugs.python.org/issue25940")
def test_connect_ex(self): def test_connect_ex(self):
# Issue #11326: check connect_ex() implementation # Issue #11326: check connect_ex() implementation
with test_support.transient_internet("svn.python.org"): with test_support.transient_internet("svn.python.org"):
...@@ -352,6 +354,7 @@ class NetworkedTests(unittest.TestCase): ...@@ -352,6 +354,7 @@ class NetworkedTests(unittest.TestCase):
if test_support.verbose: if test_support.verbose:
sys.stdout.write("\nNeeded %d calls to do_handshake() to establish session.\n" % count) sys.stdout.write("\nNeeded %d calls to do_handshake() to establish session.\n" % count)
@unittest.skipIf(True, "svn.python.org cert changed; see https://bugs.python.org/issue25940")
def test_get_server_certificate(self): def test_get_server_certificate(self):
with test_support.transient_internet("svn.python.org"): with test_support.transient_internet("svn.python.org"):
pem = ssl.get_server_certificate(("svn.python.org", 443)) pem = ssl.get_server_certificate(("svn.python.org", 443))
......
...@@ -235,6 +235,7 @@ class BasicSocketTests(unittest.TestCase): ...@@ -235,6 +235,7 @@ class BasicSocketTests(unittest.TestCase):
class NetworkedTests(unittest.TestCase): class NetworkedTests(unittest.TestCase):
@unittest.skipIf(True, "svn.python.org cert changed; see https://bugs.python.org/issue25940")
def test_connect(self): def test_connect(self):
with test_support.transient_internet("svn.python.org"): with test_support.transient_internet("svn.python.org"):
s = ssl.wrap_socket(socket.socket(socket.AF_INET), s = ssl.wrap_socket(socket.socket(socket.AF_INET),
...@@ -264,6 +265,7 @@ class NetworkedTests(unittest.TestCase): ...@@ -264,6 +265,7 @@ class NetworkedTests(unittest.TestCase):
finally: finally:
s.close() s.close()
@unittest.skipIf(True, "svn.python.org cert changed; see https://bugs.python.org/issue25940")
def test_connect_ex(self): def test_connect_ex(self):
# Issue #11326: check connect_ex() implementation # Issue #11326: check connect_ex() implementation
with test_support.transient_internet("svn.python.org"): with test_support.transient_internet("svn.python.org"):
...@@ -353,6 +355,7 @@ class NetworkedTests(unittest.TestCase): ...@@ -353,6 +355,7 @@ class NetworkedTests(unittest.TestCase):
if test_support.verbose: if test_support.verbose:
sys.stdout.write("\nNeeded %d calls to do_handshake() to establish session.\n" % count) sys.stdout.write("\nNeeded %d calls to do_handshake() to establish session.\n" % count)
@unittest.skipIf(True, "svn.python.org cert changed; see https://bugs.python.org/issue25940")
def test_get_server_certificate(self): def test_get_server_certificate(self):
with test_support.transient_internet("svn.python.org"): with test_support.transient_internet("svn.python.org"):
pem = ssl.get_server_certificate(("svn.python.org", 443)) pem = ssl.get_server_certificate(("svn.python.org", 443))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment