summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@aei.ca>2014-01-28 07:35:09 (GMT)
committerThomas Guyot-Sionnest <dermoth@aei.ca>2014-01-28 07:35:09 (GMT)
commitc30be5877cf0756dbdc361f7049483bf737f9403 (patch)
treeb9c47316f594ed53d150f818443fb6743ea91f40 /plugins
parentf34f51a005408a95cd2b20d739f761106857ef7b (diff)
downloadmonitoring-plugins-c30be5877cf0756dbdc361f7049483bf737f9403.tar.gz
Clarify check_mysql test prompts
Also default to "-u test -ptest" which are default MySQL accounts only missing the prescribed privileges. The database is no longer specified as it is not used. If wanted is should be its own parameter/tests.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/t/check_mysql.t32
1 files changed, 17 insertions, 15 deletions
diff --git a/plugins/t/check_mysql.t b/plugins/t/check_mysql.t
index d971645..28cd4cd 100644
--- a/plugins/t/check_mysql.t
+++ b/plugins/t/check_mysql.t
@@ -21,27 +21,29 @@ plan skip_all => "check_mysql not compiled" unless (-x "check_mysql");
21plan tests => 15; 21plan tests => 15;
22 22
23my $bad_login_output = '/Access denied for user /'; 23my $bad_login_output = '/Access denied for user /';
24my $mysqlserver = getTestParameter( 24my $mysqlserver = getTestParameter(
25 "NP_MYSQL_SERVER", 25 "NP_MYSQL_SERVER",
26 "A MySQL Server hostname or IP with no slaves setup" 26 "A MySQL Server hostname or IP with no slaves setup"
27 ); 27 );
28my $mysqlsocket = getTestParameter( 28my $mysqlsocket = getTestParameter(
29 "NP_MYSQL_SOCKET", 29 "NP_MYSQL_SOCKET",
30 "A MySQL Server socket with no slaves setup" 30 "Full path to a MySQL Server socket with no slaves setup"
31 ); 31 );
32my $mysql_login_details = getTestParameter( 32my $mysql_login_details = getTestParameter(
33 "MYSQL_LOGIN_DETAILS", 33 "MYSQL_LOGIN_DETAILS",
34 "Command line parameters to specify login access", 34 "Command line parameters to specify login access (requires " .
35 "-u user -ppw -d db", 35 "REPLICATION CLIENT privleges)",
36 "-u test -ptest",
36 ); 37 );
37my $with_slave = getTestParameter( 38my $with_slave = getTestParameter(
38 "NP_MYSQL_WITH_SLAVE", 39 "NP_MYSQL_WITH_SLAVE",
39 "MySQL server with slaves setup" 40 "MySQL server with slaves setup"
40 ); 41 );
41my $with_slave_login = getTestParameter( 42my $with_slave_login = getTestParameter(
42 "NP_MYSQL_WITH_SLAVE_LOGIN", 43 "NP_MYSQL_WITH_SLAVE_LOGIN",
43 "Login details for server with slave", 44 "Login details for server with slave (requires REPLICATION CLIENT " .
44 "-uroot -ppw" 45 "privleges)",
46 $mysql_login_details || "-u test -ptest"
45 ); 47 );
46 48
47my $result; 49my $result;