summaryrefslogtreecommitdiffstats
path: root/plugins/t/check_mysql_query.t
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/t/check_mysql_query.t')
-rw-r--r--plugins/t/check_mysql_query.t13
1 files changed, 3 insertions, 10 deletions
diff --git a/plugins/t/check_mysql_query.t b/plugins/t/check_mysql_query.t
index 407af88..c30245b 100644
--- a/plugins/t/check_mysql_query.t
+++ b/plugins/t/check_mysql_query.t
@@ -17,15 +17,8 @@ use vars qw($tests);
17 17
18plan skip_all => "check_mysql_query not compiled" unless (-x "check_mysql_query"); 18plan skip_all => "check_mysql_query not compiled" unless (-x "check_mysql_query");
19 19
20my $mysqlserver = getTestParameter( 20my $mysqlserver = getTestParameter("NP_MYSQL_SERVER", "A MySQL Server with no slaves setup");
21 "NP_MYSQL_SERVER", 21my $mysql_login_details = getTestParameter("NP_MYSQL_LOGIN_DETAILS", "Command line parameters to specify login access", "-u user -ppw -d db");
22 "A MySQL Server with no slaves setup"
23 );
24my $mysql_login_details = getTestParameter(
25 "MYSQL_LOGIN_DETAILS",
26 "Command line parameters to specify login access",
27 "-u user -ppw -d db",
28 );
29my $result; 22my $result;
30 23
31if (! $mysqlserver) { 24if (! $mysqlserver) {
@@ -38,7 +31,7 @@ $result = NPTest->testCmd("./check_mysql_query -q 'SELECT 1+1' -H $mysqlserver $
38cmp_ok( $result->return_code, '==', 0, "Can run query"); 31cmp_ok( $result->return_code, '==', 0, "Can run query");
39 32
40$result = NPTest->testCmd("./check_mysql_query -H $mysqlserver $mysql_login_details"); 33$result = NPTest->testCmd("./check_mysql_query -H $mysqlserver $mysql_login_details");
41cmp_ok( $result->return_code, '==', 3, "Missing query parmeter"); 34cmp_ok( $result->return_code, '==', 3, "Missing query parameter");
42like( $result->output, "/Must specify a SQL query to run/", "Missing query error message"); 35like( $result->output, "/Must specify a SQL query to run/", "Missing query error message");
43 36
44$result = NPTest->testCmd("./check_mysql_query -q 'SELECT 1+1' -H $mysqlserver -u dummy -d mysql"); 37$result = NPTest->testCmd("./check_mysql_query -q 'SELECT 1+1' -H $mysqlserver -u dummy -d mysql");