mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 07:23:00 +00:00
Drop support for db upgrade from before 1.0
- define jupyterhub oauth client during token app
This commit is contained in:
@@ -214,6 +214,8 @@ class NewToken(Application):
|
||||
hub = JupyterHub(parent=self)
|
||||
hub.load_config_file(hub.config_file)
|
||||
hub.init_db()
|
||||
hub.init_hub()
|
||||
hub.init_oauth()
|
||||
|
||||
def init_users():
|
||||
loop = asyncio.new_event_loop()
|
||||
|
@@ -62,8 +62,6 @@ def populate_db(url):
|
||||
db.commit()
|
||||
|
||||
# create some oauth objects
|
||||
if jupyterhub.version_info >= (0, 8):
|
||||
# create oauth client
|
||||
client = orm.OAuthClient(identifier='oauth-client')
|
||||
db.add(client)
|
||||
db.commit()
|
||||
@@ -83,7 +81,6 @@ def populate_db(url):
|
||||
db.commit()
|
||||
|
||||
# set some timestamps added in 0.9
|
||||
if jupyterhub.version_info >= (0, 9):
|
||||
assert user.created
|
||||
assert admin.created
|
||||
# set last_activity
|
||||
|
@@ -36,7 +36,7 @@ def generate_old_db(env_dir, hub_version, db_url):
|
||||
check_call([env_py, populate_db, db_url])
|
||||
|
||||
|
||||
@pytest.mark.parametrize('hub_version', ['0.7.2', '0.8.1', '0.9.4'])
|
||||
@pytest.mark.parametrize('hub_version', ['1.0.0', "1.2.2", "1.3.0"])
|
||||
async def test_upgrade(tmpdir, hub_version):
|
||||
db_url = os.getenv('JUPYTERHUB_TEST_DB_URL')
|
||||
if db_url:
|
||||
|
Reference in New Issue
Block a user