Commit d39f5008 authored by Adrià Labay's avatar Adrià Labay

changed test database name

parent 9b7a00c7
Pipeline #33403 passed with stages
in 8 minutes and 42 seconds
......@@ -57,10 +57,9 @@ test_py:
services:
- mysql:5.7
variables:
MYSQL_DATABASE: "course_dev"
MYSQL_DATABASE: "course_test"
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
script:
- echo "SELECT 'OK';" | mysql -uroot -h mysql "course_dev"
- yarn test:py:cov
artifacts:
paths:
......
CREATE DATABASE IF NOT EXISTS course_dev;
USE course_dev;
CREATE DATABASE IF NOT EXISTS course_test;
USE course_test;
......@@ -22,7 +22,7 @@ def datadir():
@pytest.fixture(scope="module")
def db_host():
try:
MySQLdb.connect('localhost', "root", "", "course_dev")
MySQLdb.connect('localhost', "root", "", "course_test")
except Exception:
return 'mysql'
......@@ -46,7 +46,7 @@ def db_app(config_app, db_host):
db.init_app(app)
app.config.update(SQLALCHEMY_DATABASE_URI=f'mysql://root:@{db_host}/course_dev')
app.config.update(SQLALCHEMY_DATABASE_URI=f'mysql://root:@{db_host}/course_test')
with TemporaryDirectory() as temp_dir:
app.config.update(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment