aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgit-marijus <mario@mariovavti.com>2017-05-07 15:06:45 +0200
committerGitHub <noreply@github.com>2017-05-07 15:06:45 +0200
commitbd3708870d04bd59d3a632945d1f4ff63640afe8 (patch)
tree783a4dc2f9e9e3bd915b5e38133e53e9a387f057
parent2aa699d03e17091b92c55da0b16833b299b0d081 (diff)
parentf162508ad18b1fca9a5201f4956d52022bd941a8 (diff)
downloadvolse-hubzilla-bd3708870d04bd59d3a632945d1f4ff63640afe8.tar.gz
volse-hubzilla-bd3708870d04bd59d3a632945d1f4ff63640afe8.tar.bz2
volse-hubzilla-bd3708870d04bd59d3a632945d1f4ff63640afe8.zip
Merge pull request #756 from dawnbreak/QA_testing
:construction_worker::white_check_mark::bug: Import table structure in TravisCI.
-rw-r--r--.travis.yml2
-rw-r--r--install/schema_postgres.sql2
-rwxr-xr-xtests/travis/prepare_mysql.sh11
-rwxr-xr-xtests/travis/prepare_pgsql.sh13
4 files changed, 22 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index e1aec9145..53a0f73f7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -103,7 +103,7 @@ before_install:
# Install composer dev libs
install:
- - travis_retry composer install --optimize-autoloader
+ - travis_retry composer install --optimize-autoloader --no-progress
# execute any number of scripts before the test run, custom env's are available as variables
before_script:
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index 774f355aa..389cc6a84 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -753,7 +753,7 @@ CREATE TABLE "mail" (
"to_xchan" text NOT NULL DEFAULT '',
"account_id" bigint NOT NULL DEFAULT '0',
"channel_id" bigint NOT NULL DEFAULT '0',
- "mail_mimetype char(64) NOT NULL DEFAULT '0',
+ "mail_mimetype" char(64) NOT NULL DEFAULT '0',
"title" text NOT NULL,
"body" text NOT NULL,
"sig" text NOT NULL,
diff --git a/tests/travis/prepare_mysql.sh b/tests/travis/prepare_mysql.sh
index 92c720205..b3d84253c 100755
--- a/tests/travis/prepare_mysql.sh
+++ b/tests/travis/prepare_mysql.sh
@@ -36,4 +36,13 @@ mysql -e "SHOW VARIABLES LIKE 'character_set%';"
mysql -e "SELECT @@sql_mode;"
# Create Hubzilla database
-mysql -e "CREATE DATABASE IF NOT EXISTS hubzilla;" -uroot;
+mysql -u root -e "CREATE DATABASE IF NOT EXISTS hubzilla;";
+mysql -u root -e "CREATE USER 'hubzilla'@'localhost' IDENTIFIED BY 'hubzilla';"
+mysql -u root -e "GRANT ALL ON hubzilla.* TO 'hubzilla'@'localhost';"
+
+# Import table structure
+mysql -u root hubzilla < ./install/schema_mysql.sql
+
+# Show databases and tables
+mysql -u root -e "SHOW DATABASES;"
+mysql -u root -e "USE hubzilla; SHOW TABLES;"
diff --git a/tests/travis/prepare_pgsql.sh b/tests/travis/prepare_pgsql.sh
index dcd83f3be..63c7388cb 100755
--- a/tests/travis/prepare_pgsql.sh
+++ b/tests/travis/prepare_pgsql.sh
@@ -30,8 +30,15 @@ echo "Preparing for PostgreSQL ..."
# Print out some PostgreSQL information
psql --version
# Why does this hang further execution of the job?
-psql -c "SELECT VERSION();" -U postgres
+psql -U postgres -c "SELECT VERSION();"
# Create Hubzilla database
-psql -c "DROP DATABASE IF EXISTS hubzilla;" -U postgres
-psql -c "CREATE DATABASE hubzilla;" -U postgres
+psql -U postgres -c "DROP DATABASE IF EXISTS hubzilla;"
+psql -U postgres -c "CREATE DATABASE hubzilla;"
+
+# Import table structure
+psql -U postgres -v ON_ERROR_STOP=1 hubzilla < ./install/schema_postgres.sql
+
+# Show databases and tables
+psql -U postgres -l
+psql -U postgres -d hubzilla -c "\dt;"