use root user

This commit is contained in:
Friedrich Lindenberg 2017-09-02 09:01:30 +02:00
parent 67e02ef021
commit 2f0fa7cdd2

View File

@ -10,7 +10,7 @@ services:
env: env:
- 'DATABASE_URL=sqlite:///:memory:' - 'DATABASE_URL=sqlite:///:memory:'
- DATABASE_URL=postgresql+psycopg2://postgres@127.0.0.1/dataset - DATABASE_URL=postgresql+psycopg2://postgres@127.0.0.1/dataset
- DATABASE_URL=mysql+pymysql://travis@127.0.0.1/dataset?charset=utf8 - DATABASE_URL=mysql+pymysql://root@127.0.0.1/dataset?charset=utf8
install: install:
- pip install -U pip wheel - pip install -U pip wheel
- pip install flake8 psycopg2 PyMySQL nose - pip install flake8 psycopg2 PyMySQL nose
@ -18,7 +18,7 @@ install:
before_script: before_script:
- sh -c "if [ '$DATABASE_URL' = 'postgresql+psycopg2://postgres@127.0.0.1/dataset' ]; then psql -c 'DROP DATABASE IF EXISTS dataset;' -U postgres; fi" - sh -c "if [ '$DATABASE_URL' = 'postgresql+psycopg2://postgres@127.0.0.1/dataset' ]; then psql -c 'DROP DATABASE IF EXISTS dataset;' -U postgres; fi"
- sh -c "if [ '$DATABASE_URL' = 'postgresql+psycopg2://postgres@127.0.0.1/dataset' ]; then psql -c 'create database dataset;' -U postgres; fi" - sh -c "if [ '$DATABASE_URL' = 'postgresql+psycopg2://postgres@127.0.0.1/dataset' ]; then psql -c 'create database dataset;' -U postgres; fi"
- sh -c "if [ '$DATABASE_URL' = 'mysql+pymysql://travis@127.0.0.1/dataset?charset=utf8' ]; then mysql -e 'create database IF NOT EXISTS dataset DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'; fi" - sh -c "if [ '$DATABASE_URL' = 'mysql+pymysql://root@127.0.0.1/dataset?charset=utf8' ]; then mysql -e 'create database IF NOT EXISTS dataset DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'; fi"
script: script:
- flake8 --ignore=E501,E123,E124,E126,E127,E128 dataset test - flake8 --ignore=E501,E123,E124,E126,E127,E128 dataset test
- nosetests -v - nosetests -v