add tests for db upgrade with mysql, postgres

This commit is contained in:
Min RK
2017-09-27 16:16:18 +02:00
parent c453e5ad20
commit a4a2c9d068
5 changed files with 78 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
import os
c.JupyterHub.cookie_secret = os.urandom(32)
DB = os.environ.get('DB')
if DB == 'mysql':
c.JupyterHub.db_url = 'mysql+pymysql://root:x@127.0.0.1:13306/jupyterhub'
elif DB == 'postgres':
c.JupyterHub.db_url = 'postgresql://postgres@127.0.0.1:15432/jupyterhub'
c.JupyterHub.authenticator_class = 'jupyterhub.auth.Authenticator'
c.Authenticator.whitelist = {'alpha', 'beta', 'gamma'}