Skip to content

Commit

Permalink
set base jupyterhub db upgrade-from test version to 1.1
Browse files Browse the repository at this point in the history
jupyterhub 1.0 is not compatible with more recent mysql
  • Loading branch information
minrk committed Nov 30, 2022
1 parent ec8e6e2 commit 4938ed6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ci/init-db.sh
Expand Up @@ -19,8 +19,9 @@ else
fi

# Configure a set of databases in the database server for upgrade tests
# this list must be in sync with versions in test_db.py:test_upgrade
set -x
for SUFFIX in '' _upgrade_100 _upgrade_122 _upgrade_130 _upgrade_150 _upgrade_211; do
for SUFFIX in '' _upgrade_110 _upgrade_122 _upgrade_130 _upgrade_150 _upgrade_211; do
$SQL_CLIENT "DROP DATABASE jupyterhub${SUFFIX};" 2>/dev/null || true
$SQL_CLIENT "CREATE DATABASE jupyterhub${SUFFIX} ${EXTRA_CREATE_DATABASE_ARGS:-};"
done
4 changes: 3 additions & 1 deletion jupyterhub/tests/test_db.py
Expand Up @@ -35,7 +35,9 @@ def generate_old_db(env_dir, hub_version, db_url):
check_call([env_py, populate_db, db_url])


@pytest.mark.parametrize('hub_version', ['1.0.0', "1.2.2", "1.3.0", "1.5.0", "2.1.1"])
# changes to this version list must also be reflected
# in ci/init-db.sh
@pytest.mark.parametrize('hub_version', ["1.1.0", "1.2.2", "1.3.0", "1.5.0", "2.1.1"])
async def test_upgrade(tmpdir, hub_version):
db_url = os.getenv('JUPYTERHUB_TEST_DB_URL')
if db_url:
Expand Down

0 comments on commit 4938ed6

Please sign in to comment.