summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2006-02-01 13:23:38 +0000
committerTon Voon <tonvoon@users.sourceforge.net>2006-02-01 13:23:38 +0000
commita1e69e1436867a2dd2dc7f468f227406ccda237c (patch)
tree8aaa362eaeebf0a63b405898fe81b193cbc899d7
parentfec8900e4f228ca9882aec13cb0cdd483c88edac (diff)
downloadmonitoring-plugins-a1e69e1436867a2dd2dc7f468f227406ccda237c.tar.gz
If a mysql server has anonymous login, tests will always fail
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1315 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--plugins/t/check_mysql_query.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/t/check_mysql_query.t b/plugins/t/check_mysql_query.t
index f4743b7b..f78f07b8 100644
--- a/plugins/t/check_mysql_query.t
+++ b/plugins/t/check_mysql_query.t
@@ -6,7 +6,7 @@
6# 6#
7# 7#
8# These are the database permissions required for this test: 8# These are the database permissions required for this test:
9# GRANT SELECT ON $db.* TO $user@$host INDENTIFIED BY '$password'; 9# GRANT SELECT ON $db.* TO $user@$host IDENTIFIED BY '$password';
10# Check with: 10# Check with:
11# mysql -u$user -p$password -h$host $db 11# mysql -u$user -p$password -h$host $db
12 12
@@ -42,7 +42,7 @@ $result = NPTest->testCmd("./check_mysql_query -H $mysqlserver $mysql_login_deta
42cmp_ok( $result->return_code, '==', 3, "Missing query parmeter"); 42cmp_ok( $result->return_code, '==', 3, "Missing query parmeter");
43like( $result->output, "/Must specify a SQL query to run/", "Missing query error message"); 43like( $result->output, "/Must specify a SQL query to run/", "Missing query error message");
44 44
45$result = NPTest->testCmd("./check_mysql_query -q 'SELECT 1+1' -H $mysqlserver -u dummy"); 45$result = NPTest->testCmd("./check_mysql_query -q 'SELECT 1+1' -H $mysqlserver -u dummy -d mysql");
46cmp_ok( $result->return_code, '==', 2, "Login failure"); 46cmp_ok( $result->return_code, '==', 2, "Login failure");
47like( $result->output, "/Access denied for user /", "Expected login failure message"); 47like( $result->output, "/Access denied for user /", "Expected login failure message");
48 48