[Nagiosplug-checkins] nagiosplug/plugins/t check_mysql_query.t,1.1,1.2
Ton Voon
tonvoon at users.sourceforge.net
Wed Feb 1 05:24:05 CET 2006
Update of /cvsroot/nagiosplug/nagiosplug/plugins/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13480
Modified Files:
check_mysql_query.t
Log Message:
If a mysql server has anonymous login, tests will always fail
Index: check_mysql_query.t
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/t/check_mysql_query.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- check_mysql_query.t 31 Jan 2006 14:52:49 -0000 1.1
+++ check_mysql_query.t 1 Feb 2006 13:23:38 -0000 1.2
@@ -6,7 +6,7 @@
#
#
# These are the database permissions required for this test:
-# GRANT SELECT ON $db.* TO $user@$host INDENTIFIED BY '$password';
+# GRANT SELECT ON $db.* TO $user@$host IDENTIFIED BY '$password';
# Check with:
# mysql -u$user -p$password -h$host $db
@@ -42,7 +42,7 @@
cmp_ok( $result->return_code, '==', 3, "Missing query parmeter");
like( $result->output, "/Must specify a SQL query to run/", "Missing query error message");
-$result = NPTest->testCmd("./check_mysql_query -q 'SELECT 1+1' -H $mysqlserver -u dummy");
+$result = NPTest->testCmd("./check_mysql_query -q 'SELECT 1+1' -H $mysqlserver -u dummy -d mysql");
cmp_ok( $result->return_code, '==', 2, "Login failure");
like( $result->output, "/Access denied for user /", "Expected login failure message");
More information about the Commits
mailing list