Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (3)
run-dbtests: Fix command not found on empty USER_CMD
· 0e18b7a9
Niels Thykier
authored
May 23, 2018
and
Ansgar
committed
May 23, 2018
Signed-off-by:
Niels Thykier
<
niels@thykier.net
>
0e18b7a9
run-dbtests: Fail on error (set -e)
· a0863ea4
Niels Thykier
authored
May 23, 2018
and
Ansgar
committed
May 23, 2018
Signed-off-by:
Niels Thykier
<
niels@thykier.net
>
a0863ea4
Merge branch 'improve-run-dbtests' into 'master'
· 48c977b8
Ansgar
authored
May 23, 2018
Improve run dbtests See merge request
!68
48c977b8
Show whitespace changes
Inline
Side-by-side
tests/run-dbtests
View file @
48c977b8
#!/bin/bash
set
-e
# Create the database that will be used by the fixtures, populating it with the
# default data. Also create a test dak directory.
...
...
@@ -12,9 +14,11 @@ export PGDATABASE=test_projectb
if
[[
!
-v
DAK_INTEGRATION_TEST
]]
;
then
SYS_CMD
=
"sudo"
KEEP_ENV_OPT
=
"-E"
USER_CMD
=
"sudo -u dak PGDATABASE=
${
PGDATABASE
}
DAKBASE=
${
DAKBASE
}
"
else
SYS_CMD
=
""
KEEP_ENV_OPT
=
""
USER_CMD
=
""
fi
...
...
@@ -26,7 +30,7 @@ test-setup() {
test-cleanup
()
{
echo
Dropping DB
${
PGDATABASE
}
$USER_CMD
-E
dropdb
${
PGDATABASE
}
$USER_CMD
$KEEP_ENV_OPT
dropdb
${
PGDATABASE
}
echo
Deleting temporary directory
$SYS_CMD
rm
-rf
--
${
DAKBASE
}
}
...
...