Skip to content

Commit

Permalink
Do not expect scl_source to return zero exitcode
Browse files Browse the repository at this point in the history
  • Loading branch information
hhorak committed Jan 26, 2016
1 parent c0d5dfc commit 1e0783b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions collections/mysql-common/basic-usage/create-user.sh
Expand Up @@ -11,7 +11,10 @@ set -xe

service $SERVICE_NAME restart

# scl_source returns non-zero return code from some reason
set +e
source scl_source enable ${ENABLE_SCLS}
set -e

mysql -u root <<'EOF'
CREATE DATABASE IF NOT EXISTS db1;
Expand All @@ -36,6 +39,7 @@ SELECT COUNT(*) as count FROM test_table WHERE fakevalue=4 \G
EOF
)
out=$(echo "$out"|tail -n 1)
echo "output: $out, expected: 'count: 1'"

[ "$out" == "count: 1" ]

4 changes: 2 additions & 2 deletions collections/postgresql-common/basic-usage/basic-test.sh
Expand Up @@ -7,12 +7,12 @@
THISDIR=$(dirname ${BASH_SOURCE[0]})
source ${THISDIR}/../../../common/functions.sh

set -xe

[ -z "${PGDATA}" ] && exit_fail "Environment variable PGDATA must be set"

source scl_source enable ${ENABLE_SCLS}

set -xe

export PGPASSWORD=secretpass
psql -d testdb -U testuser <<EOF
\x on
Expand Down

0 comments on commit 1e0783b

Please sign in to comment.