2
0
Эх сурвалжийг харах

- add correct listen statement to test 12
- fix database checks in include, don't output data


git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4806 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt 17 жил өмнө
parent
commit
5917d1f5e1

+ 1 - 0
test/unit/12.cfg

@@ -1,4 +1,5 @@
 log_stderror=yes
+listen=127.0.0.1
 mpath="../modules/"
 loadmodule "db_mysql/db_mysql.so"
 loadmodule "sl/sl.so"

+ 3 - 3
test/unit/include/database

@@ -19,16 +19,16 @@
 MYSQL="mysql openser --show-warnings --batch --user=openser --password=openserrw -e"
 
 function check_mysql() {
-	$MYSQL "select * from location;"
+	$MYSQL "select * from location;" > /dev/null
 	if ! [ "$?" -eq 0 ] ; then
 		echo "can't read from database"
 		return -1
 	fi;
-	$MYSQL "insert into location (user_agent) values ('___test___');"
+	$MYSQL "insert into location (user_agent) values ('___test___');" > /dev/null
 	if ! [ "$?" -eq 0 ] ; then
 		echo "can't write to database"
 		return -1
 	fi;
-	$MYSQL "delete from location where user_agent ='___test___';"
+	$MYSQL "delete from location where user_agent ='___test___';" > /dev/null
 	return 0
 }