Kaynağa Gözat

- don' run test that depends on the db root password if this is not available

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3078 689a6050-402a-0410-94f2-e92a70836424
Henning Westerholt 18 yıl önce
ebeveyn
işleme
a4cb39ac4b
1 değiştirilmiş dosya ile 9 ekleme ve 1 silme
  1. 9 1
      test/unit/3.sh

+ 9 - 1
test/unit/3.sh

@@ -2,6 +2,14 @@
 # creates a database with openserdbctl and deletes it again
 
 # Needs a mysql database, the root user password must be given
+# in the file 'dbrootpw'
+
+if [ ! -f dbrootpw ] ; then
+	echo "no root password, not run"
+	exit 0
+fi ;
+
+source dbrootpw
 
 tmp_name=""$RANDOM"_openserdb_tmp"
 
@@ -17,7 +25,7 @@ sed -i "s/# INSTALL_SERWEB_TABLES=ask/INSTALL_SERWEB_TABLES=yes/g" openserctlrc
 
 # set the mysql root password
 cp openserdbctl.mysql openserdbctl.mysql.bak
-sed -i "s/#PW=""/PW=""/g" openserdbctl.mysql
+sed -i "s/#PW=""/PW="$PW"/g" openserdbctl.mysql
 
 ./openserdbctl create $tmp_name > /dev/null
 ret=$?