Commit 78162dee authored by Vincent Pelletier's avatar Vincent Pelletier

test: Do not hardcode listening port in testHttpNetlocIPv6.

parent 5d8d9b77
......@@ -2565,8 +2565,12 @@ class CaucaseTest(unittest.TestCase):
self._stopServer()
os.unlink(self._server_key)
os.unlink(self._server_db)
self._server_netloc = '[::1]:8000'
self._caucase_url = 'http://' + self._server_netloc
netloc = '[::1]'
port = urlparse.urlparse(self._caucase_url).port
if port:
netloc += ':%s' % port
self._server_netloc = netloc
self._caucase_url = 'http://' + netloc
self._startServer()
user_key_path = self._createFirstUser()
service_key = self._createAndApproveCertificate(
......@@ -2584,7 +2588,7 @@ class CaucaseTest(unittest.TestCase):
x509.CRLDistributionPoints,
).value
uri, = distribution_point.full_name
self.assertEqual(uri.value, u'http://[::1]:8000/cas/crl')
self.assertEqual(uri.value, self._caucase_url + u'/cas/crl')
def testServerFilePermissions(self):
"""
......
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