From a1e69e1436867a2dd2dc7f468f227406ccda237c Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Wed, 1 Feb 2006 13:23:38 +0000 Subject: 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 diff --git a/plugins/t/check_mysql_query.t b/plugins/t/check_mysql_query.t index f4743b7..f78f07b 100644 --- a/plugins/t/check_mysql_query.t +++ b/plugins/t/check_mysql_query.t @@ -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 @@ $result = NPTest->testCmd("./check_mysql_query -H $mysqlserver $mysql_login_deta 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"); -- cgit v0.10-9-g596f