diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-02-01 13:23:38 (GMT) |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-02-01 13:23:38 (GMT) |
commit | a1e69e1436867a2dd2dc7f468f227406ccda237c (patch) | |
tree | 8aaa362eaeebf0a63b405898fe81b193cbc899d7 /plugins/t | |
parent | fec8900e4f228ca9882aec13cb0cdd483c88edac (diff) | |
download | monitoring-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
Diffstat (limited to 'plugins/t')
-rw-r--r-- | plugins/t/check_mysql_query.t | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ | |||
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 | |||
42 | cmp_ok( $result->return_code, '==', 3, "Missing query parmeter"); | 42 | cmp_ok( $result->return_code, '==', 3, "Missing query parmeter"); |
43 | like( $result->output, "/Must specify a SQL query to run/", "Missing query error message"); | 43 | like( $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"); |
46 | cmp_ok( $result->return_code, '==', 2, "Login failure"); | 46 | cmp_ok( $result->return_code, '==', 2, "Login failure"); |
47 | like( $result->output, "/Access denied for user /", "Expected login failure message"); | 47 | like( $result->output, "/Access denied for user /", "Expected login failure message"); |
48 | 48 | ||