Commit 2cf0f7fa authored by Jérome Perrin's avatar Jérome Perrin

debug 1 test

parent 627cc358
...@@ -21,9 +21,12 @@ import tempfile ...@@ -21,9 +21,12 @@ import tempfile
import time import time
import logging import logging
import urlparse import urlparse
import atexit
setUpModule # pyflakes setUpModule # pyflakes
def setUpModule():
print "no setupmodule"
class TestHandler(BaseHTTPRequestHandler): class TestHandler(BaseHTTPRequestHandler):
def do_GET(self): def do_GET(self):
...@@ -56,7 +59,8 @@ class EchoServerMixin(object): ...@@ -56,7 +59,8 @@ class EchoServerMixin(object):
target=server.serve_forever, name='HTTPServer') target=server.serve_forever, name='HTTPServer')
cls.http_server_process.start() cls.http_server_process.start()
cls.http_server_netloc = '%s:%s' % (cls._ipv4_address, http_server_port) cls.http_server_netloc = '%s:%s' % (cls._ipv4_address, http_server_port)
atexit.register(cls.http_server_process.terminate) # XXX
@classmethod @classmethod
def stopEchoServer(cls): def stopEchoServer(cls):
if cls.http_server_process: if cls.http_server_process:
...@@ -64,6 +68,7 @@ class EchoServerMixin(object): ...@@ -64,6 +68,7 @@ class EchoServerMixin(object):
class BalancerTestCase(ERP5InstanceTestCase, EchoServerMixin): class BalancerTestCase(ERP5InstanceTestCase, EchoServerMixin):
instance_max_retry = 2 # XXX debug
http_server_process = None http_server_process = None
@classmethod @classmethod
......
...@@ -40,7 +40,7 @@ from . import ERP5InstanceTestCase ...@@ -40,7 +40,7 @@ from . import ERP5InstanceTestCase
from . import setUpModule from . import setUpModule
setUpModule # pyflakes setUpModule # pyflakes
class ERP5InstanceTestCase: def xxx_setUpModule():
pass pass
...@@ -62,6 +62,7 @@ class TestPublishedURLIsReachableMixin(object): ...@@ -62,6 +62,7 @@ class TestPublishedURLIsReachableMixin(object):
caucase_cas_hal = requests.get( caucase_cas_hal = requests.get(
caucase_hal['_links']['getCASHAL']['href']).json() caucase_hal['_links']['getCASHAL']['href']).json()
import pdb; pdb.set_trace()
caucase_cas_ca = requests.get(caucase_cas_hal['_links']['getCACertificate']['href']).text caucase_cas_ca = requests.get(caucase_cas_hal['_links']['getCACertificate']['href']).text
self.assertIn('-----BEGIN CERTIFICATE-----', caucase_cas_ca) self.assertIn('-----BEGIN CERTIFICATE-----', caucase_cas_ca)
...@@ -324,3 +325,6 @@ class TestZopeNodeParameterOverride(ERP5InstanceTestCase, TestPublishedURLIsReac ...@@ -324,3 +325,6 @@ class TestZopeNodeParameterOverride(ERP5InstanceTestCase, TestPublishedURLIsReac
}, { }, {
"cache-size": None, "cache-size": None,
}) })
del TestDisableTestRunner, TestMedusa, TestApacheBalancerPorts, TestZopeNodeParameterOverride
\ No newline at end of file
...@@ -289,4 +289,4 @@ class TestMroonga(MariaDBTestCase): ...@@ -289,4 +289,4 @@ class TestMroonga(MariaDBTestCase):
], list(sorted(cnx.store_result().fetch_row(maxrows=4)))) ], list(sorted(cnx.store_result().fetch_row(maxrows=4))))
del TestMariaDB, TestMroonga del TestMariaDB, TestMroonga, TestCrontabs
\ No newline at end of file \ No newline at end of file
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