Skip to content

Commit

Permalink
test/unit: 3.sh - updates for using db root password with kamdbctl
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Dec 1, 2017
1 parent 3138051 commit f5ea35b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/unit/3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

# Needs a mysql database, the root user password must be assigned to
# the 'PW' variable in the file 'dbrootpw' in the test directory, e.g.:
# PW=sql_root_passwd
# the 'DBROOTPW' variable in the file 'dbrootpw' in the test directory, e.g.:
# DBROOTPW=sql_root_passwd
# If MySQL root password is empty, add in the file the line:
# PWSKIP=yes
# DBROOTPWSKIP=yes

. include/common

Expand All @@ -50,13 +50,13 @@ sed -i '' -e "s/TEST=\"false\"/TEST=\"true\"/g" $DBCTL

# set the mysql root password
cp $DBCTL.mysql $DBCTL.mysql.bak
sed -i '' -e "s/#PW=\"\"/PW=\"$PW\"/g" $DBCTL.mysql
sed -i '' -e "s/#DBROOTPW=\"\"/DBROOTPW=\"$DBROOTPW\"/g" $DBCTL.mysql

PWSKIP="$PWSKIP" CHARSET="latin1" ./$DBCTL create $tmp_name > /dev/null
DBROOTPWSKIP="$DBROOTPWSKIP" CHARSET="latin1" ./$DBCTL create $tmp_name > /dev/null
ret=$?

if [ "$ret" -eq 0 ] ; then
PWSKIP="$PWSKIP" ./$DBCTL drop $tmp_name > /dev/null
DBROOTPWSKIP="$DBROOTPWSKIP" ./$DBCTL drop $tmp_name > /dev/null
ret=$?
fi ;

Expand Down

0 comments on commit f5ea35b

Please sign in to comment.