diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_parsers.py | 6 | ||||
-rw-r--r-- | test/utils.py | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/test/test_parsers.py b/test/test_parsers.py index 420f9ff..7a30f2e 100644 --- a/test/test_parsers.py +++ b/test/test_parsers.py @@ -1,6 +1,7 @@ import unittest from utils import WebhookTestCaseBase + class WebhookTestCase(WebhookTestCaseBase): test_case = None @@ -19,7 +20,10 @@ class WebhookTestCase(WebhookTestCaseBase): # GAD configuration for this test case config = { - 'port': 0, + 'http-port': 0, + 'https-enabled': False, + 'wss-enabled': False, + 'web-ui-require-https': False, 'intercept-stdout': False, 'detailed-response': True, 'log-level': 'ERROR', diff --git a/test/utils.py b/test/utils.py index 30eeff6..551f809 100644 --- a/test/utils.py +++ b/test/utils.py @@ -48,7 +48,7 @@ class WebhookTestCaseBase(unittest.TestCase): for current_thread in threading.enumerate(): if current_thread == main_thread: continue - #print "Waiting for thread %s to finish" % current_thread + # print "Waiting for thread %s to finish" % current_thread current_thread.join() def tearDown(self): @@ -103,12 +103,15 @@ class GADRunnerThread(threading.Thread): self._app = GitAutoDeploy() self._app.setup(config) + # Setup HTTP server, but do not start serving + self._app.serve_http(serve_forever=False) + # Store PID and port in thread instance self.pid = self._app._pid - self.port = self._app._port + self.port = self._app._http_port def run(self): - self._app.handle_request() + self._app._http_server.handle_request() def exit(self): self._app.stop() |