From f1c1a16c7f1c9960a83ba8c534f539f4736c4e35 Mon Sep 17 00:00:00 2001 From: Ryan Lue Date: Tue, 8 May 2018 19:16:28 +0800 Subject: [PATCH] Hotfix for CI build broken by 297d9bb --- .travis.yml | 4 ++-- contrib/travis-ci.org/database.yml.test-mysql | 11 +++++++++++ contrib/travis-ci.org/database.yml.test-postgresql | 11 +++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 contrib/travis-ci.org/database.yml.test-mysql create mode 100644 contrib/travis-ci.org/database.yml.test-postgresql diff --git a/.travis.yml b/.travis.yml index 8d77cc9bb..59b08827a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,9 +49,9 @@ before_install: - git fetch --unshallow - if [ "${DB}" = "mysql" ]; then mysql -u root -e "CREATE USER 'some_user'@'localhost' IDENTIFIED BY 'some_pass';"; fi - if [ "${DB}" = "mysql" ]; then mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'some_user'@'localhost';"; fi - - if [ "${DB}" = "mysql" ]; then cp config/database.yml.test-mysql config/database.yml; fi + - if [ "${DB}" = "mysql" ]; then cp contrib/travis-ci.org/database.yml.test-mysql config/database.yml; fi - if [ "${DB}" = "postgresql" ]; then psql -c 'create database zammad_test;' -U postgres; fi - - if [ "${DB}" = "postgresql" ]; then cp config/database.yml.test-postgresql config/database.yml; fi + - if [ "${DB}" = "postgresql" ]; then cp contrib/travis-ci.org/database.yml.test-postgresql config/database.yml; fi - export RAILS_ENV=test - export ZAMMAD_VERSION=$(git describe --tags | sed -e 's/-[a-z0-9]\{8,\}.*//g') install: diff --git a/contrib/travis-ci.org/database.yml.test-mysql b/contrib/travis-ci.org/database.yml.test-mysql new file mode 100644 index 000000000..f6b525b4c --- /dev/null +++ b/contrib/travis-ci.org/database.yml.test-mysql @@ -0,0 +1,11 @@ +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + adapter: mysql2 + database: zammad_test + pool: 50 + timeout: 5000 + encoding: utf8 + username: some_user + password: some_pass diff --git a/contrib/travis-ci.org/database.yml.test-postgresql b/contrib/travis-ci.org/database.yml.test-postgresql new file mode 100644 index 000000000..bda094235 --- /dev/null +++ b/contrib/travis-ci.org/database.yml.test-postgresql @@ -0,0 +1,11 @@ +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + adapter: postgresql + database: zammad_test + pool: 50 + timeout: 5000 + encoding: utf8 + username: postgres + password: