diff --git a/mssql/docker-first-run.sh b/mssql/docker-first-run.sh index f1d5245..4abbe85 100755 --- a/mssql/docker-first-run.sh +++ b/mssql/docker-first-run.sh @@ -1,4 +1,5 @@ #!/bin/sh -v +set -e # https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-2017 diff --git a/mssql/test-mssql-multi-db.sh b/mssql/test-mssql-multi-db.sh index b40e41d..28ee4a4 100755 --- a/mssql/test-mssql-multi-db.sh +++ b/mssql/test-mssql-multi-db.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e echo "==================" echo "mssql multidb" diff --git a/mssql/test-mssql.sh b/mssql/test-mssql.sh index 1f5073a..698cbde 100755 --- a/mssql/test-mssql.sh +++ b/mssql/test-mssql.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e echo "==================" echo "mssql" diff --git a/mysql/docker-first-run.sh b/mysql/docker-first-run.sh index 9d332ae..102c4d1 100755 --- a/mysql/docker-first-run.sh +++ b/mysql/docker-first-run.sh @@ -1,4 +1,5 @@ #!/bin/sh -v +set -e docker pull mysql:latest docker run --name sse-mysql -e MYSQL_ROOT_PASSWORD=omgroot -p 3306:3306 -d mysql:latest sleep 25 # wait for container to come up diff --git a/mysql/run-mysql.sh b/mysql/run-mysql.sh index b7508dc..f96e9fa 100755 --- a/mysql/run-mysql.sh +++ b/mysql/run-mysql.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e cd .. export schemaexplorer_driver=mysql diff --git a/mysql/setup-once.sh b/mysql/setup-once.sh index afbaca0..c4330c5 100755 --- a/mysql/setup-once.sh +++ b/mysql/setup-once.sh @@ -1,2 +1,3 @@ #!/bin/sh +set -e docker exec -i sse-mysql mysql -pomgroot < setup-user.sql diff --git a/mysql/setup.sh b/mysql/setup.sh index fca06a7..daf723d 100755 --- a/mysql/setup.sh +++ b/mysql/setup.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e docker exec sse-mysql mysql -pomgroot -e "drop database if exists ssetest;" docker exec sse-mysql mysql -pomgroot -e "create database ssetest;" docker exec -i sse-mysql mysql -pomgroot ssetest < test-db.sql diff --git a/mysql/test-mysql.sh b/mysql/test-mysql.sh index 366512e..805bc5b 100755 --- a/mysql/test-mysql.sh +++ b/mysql/test-mysql.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e echo "==================" echo "mysql" diff --git a/pg/docker-start.sh b/pg/docker-start.sh index 471386c..8095c38 100755 --- a/pg/docker-start.sh +++ b/pg/docker-start.sh @@ -1,4 +1,5 @@ #!/bin/sh -v +set -e # https://hackernoon.com/dont-install-postgres-docker-pull-postgres-bee20e200198 mkdir -p $HOME/docker/volumes/postgres docker run --rm --name pg-docker -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres:9.6 diff --git a/pg/run-pg-multi-db.sh b/pg/run-pg-multi-db.sh index bce1e0a..4576081 100755 --- a/pg/run-pg-multi-db.sh +++ b/pg/run-pg-multi-db.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e cd .. export schemaexplorer_driver=pg diff --git a/pg/run-pg.sh b/pg/run-pg.sh index ce0949f..428c6dd 100755 --- a/pg/run-pg.sh +++ b/pg/run-pg.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e cd .. export schemaexplorer_driver=pg diff --git a/pg/setup-me.sh b/pg/setup-me.sh index 6b62cad..30fff23 100755 --- a/pg/setup-me.sh +++ b/pg/setup-me.sh @@ -1,4 +1,5 @@ #!/bin/sh -v +set -e sudo -u postgres createuser $USER sudo -u postgres createdb $USER sudo -u postgres psql -c "alter user $USER with superuser;" # https://stackoverflow.com/a/10757486/10245 diff --git a/pg/setup-ssetest.sh b/pg/setup-ssetest.sh index 9fe1a0f..fbbd546 100755 --- a/pg/setup-ssetest.sh +++ b/pg/setup-ssetest.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e usr=ssetestusr db=ssetest # config for pg in docker as per dev-setup.sh diff --git a/pg/test-pg-multi-db.sh b/pg/test-pg-multi-db.sh index d5fc792..cb5fa99 100755 --- a/pg/test-pg-multi-db.sh +++ b/pg/test-pg-multi-db.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e echo "==================" echo "postgres multi-db" diff --git a/pg/test-pg.sh b/pg/test-pg.sh index ba73cae..56aceae 100755 --- a/pg/test-pg.sh +++ b/pg/test-pg.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e echo "==================" echo "postgres" diff --git a/sqlite/run-sqlite-env.sh b/sqlite/run-sqlite-env.sh index c07a1b3..43884a4 100755 --- a/sqlite/run-sqlite-env.sh +++ b/sqlite/run-sqlite-env.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e # relative path hack with pwd, otherwise not resolved. # create db first with sqlite/setup.sh cd .. diff --git a/sqlite/run-sqlite-flags.sh b/sqlite/run-sqlite-flags.sh index c2abf2f..980b918 100755 --- a/sqlite/run-sqlite-flags.sh +++ b/sqlite/run-sqlite-flags.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e # relative path hack with pwd, otherwise not resolved. # create db first with sqlite/setup.sh cd .. diff --git a/sqlite/run-sqlite-test.sh b/sqlite/run-sqlite-test.sh index f6a4592..12bf190 100755 --- a/sqlite/run-sqlite-test.sh +++ b/sqlite/run-sqlite-test.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e # relative path hack with pwd, otherwise not resolved. # create db first with sqlite/setup.sh cd .. diff --git a/sqlite/setup.sh b/sqlite/setup.sh index a8ee964..97e979d 100755 --- a/sqlite/setup.sh +++ b/sqlite/setup.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e if [ -d db ]; then # echo 'removing old test db' rm -rf db diff --git a/sqlite/test-sqlite-env.sh b/sqlite/test-sqlite-env.sh index 94c0ceb..a3070ed 100755 --- a/sqlite/test-sqlite-env.sh +++ b/sqlite/test-sqlite-env.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e echo "==================" echo "sqlite" diff --git a/sqlite/test-sqlite-flags.sh b/sqlite/test-sqlite-flags.sh index 49db3ea..52f0256 100755 --- a/sqlite/test-sqlite-flags.sh +++ b/sqlite/test-sqlite-flags.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e echo "==================" echo "sqlite flags" diff --git a/sqlite/test-sqlite-live.sh b/sqlite/test-sqlite-live.sh index c1ba793..02a0007 100755 --- a/sqlite/test-sqlite-live.sh +++ b/sqlite/test-sqlite-live.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e echo "==================" echo "sqlite (live)" diff --git a/test-only-build-pg.sh b/test-only-build-pg.sh index e32486a..a7c0198 100755 --- a/test-only-build-pg.sh +++ b/test-only-build-pg.sh @@ -1,2 +1,3 @@ #!/bin/sh +set -e go test -tags "skip_mysql skip_sqlite skip_mssql" sse_test.go diff --git a/test.sh b/test.sh index 984f735..eb6a65e 100755 --- a/test.sh +++ b/test.sh @@ -1,4 +1,6 @@ #!/bin/bash +set -e + pushd . > /dev/null cd sqlite # test the three ways of configuring schemaexplorer