SSL setup for testing

Setup general ssl request, not just to api

Basic tests comprised of non-ssl test copies

Create the context only when request is http

Refactor ssl key, cert, ca names

Configure the AsyncHTTPClient at app start

Change tests to import existing ones with ssl on

Override __new__ in MockHub to turn on SSL
This commit is contained in:
Thomas Mendoza
2018-06-07 16:01:24 -07:00
parent 5c39325104
commit 373c3f82dd
16 changed files with 153 additions and 233 deletions

View File

@@ -508,7 +508,10 @@ class User:
cert = self.settings['internal_ssl_cert']
ca = self.settings['internal_ssl_ca']
ssl_context = make_ssl_context(key, cert, cafile=ca)
resp = await server.wait_up(http=True, timeout=spawner.http_timeout, ssl_context=ssl_context)
resp = await server.wait_up(
http=True,
timeout=spawner.http_timeout,
ssl_context=ssl_context)
except Exception as e:
if isinstance(e, TimeoutError):
self.log.warning(