mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-19 07:53:00 +00:00
add tests for db upgrade with mysql, postgres
This commit is contained in:
19
test-db-upgrade/docker-db.sh
Normal file
19
test-db-upgrade/docker-db.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
NAME="hub-test-$DB"
|
||||
docker rm -f $NAME 2>/dev/null || true
|
||||
|
||||
case $DB in
|
||||
mysql)
|
||||
ARGS="-p 13306:3306 -e MYSQL_ROOT_PASSWORD=x -e MYSQL_DATABASE=jupyterhub mysql:5.7"
|
||||
;;
|
||||
postgres)
|
||||
ARGS="-p 15432:5432 -e POSTGRES_DB=jupyterhub postgres:9.5"
|
||||
;;
|
||||
*)
|
||||
echo "must be mysql or postgres"
|
||||
exit -1
|
||||
esac
|
||||
|
||||
set -x
|
||||
docker run --rm --name $NAME -d $ARGS
|
Reference in New Issue
Block a user