mirror of
https://github.com/loewexy/pdnsmanager.git
synced 2025-01-15 18:52:20 +01:00
Fixed error in test if password is empty
This commit is contained in:
parent
8c7fbf40ef
commit
e39bb6d13c
3 changed files with 13 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,3 +7,4 @@ backend/src/config/ConfigUser.php
|
|||
backend/src/config/ConfigOverride.php
|
||||
backend/test/config.sh
|
||||
backend/test/node_modules/
|
||||
backend/test/logfile.log
|
||||
|
|
|
@ -60,7 +60,12 @@ then
|
|||
makeConfig
|
||||
|
||||
echo "Preparing Database"
|
||||
mysql "-h$DBHOST" "-u$DBUSER" "-p$DBPASSWORD" "$DBNAME" < db.sql
|
||||
if [ -z "$DBPASSWORD" ]
|
||||
then
|
||||
mysql "-h$DBHOST" "-u$DBUSER" "$DBNAME" < db.sql
|
||||
else
|
||||
mysql "-h$DBHOST" "-u$DBUSER" "-p$DBPASSWORD" "$DBNAME" < db.sql
|
||||
fi
|
||||
|
||||
echo "Executing test"
|
||||
if ! node "tests/$2.js" "$TESTURL"
|
||||
|
@ -89,7 +94,12 @@ then
|
|||
|
||||
echo -n $(basename $test .js) "..."
|
||||
|
||||
mysql "-h$DBHOST" "-u$DBUSER" "-p$DBPASSWORD" "$DBNAME" < db.sql
|
||||
if [ -z "$DBPASSWORD" ]
|
||||
then
|
||||
mysql "-h$DBHOST" "-u$DBUSER" "$DBNAME" < db.sql
|
||||
else
|
||||
mysql "-h$DBHOST" "-u$DBUSER" "-p$DBPASSWORD" "$DBNAME" < db.sql
|
||||
fi
|
||||
|
||||
echo -n "..."
|
||||
|
||||
|
|
Loading…
Reference in a new issue