summaryrefslogtreecommitdiffstats
path: root/plugins/t
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-11-07 14:15:26 +0100
committerGitHub <noreply@github.com>2025-11-07 14:15:26 +0100
commitb5e7f4e6cc8c586fdb20949369e05105157a61a7 (patch)
treefa0690f4f78a828f5bc8fb2bec07222bb5a6ab0e /plugins/t
parentca3acbe274bf44578c5ec5d0e5414379cbddb21f (diff)
parent0fb65a3a90e778f942a1f61f210a2dd969dd9597 (diff)
downloadmonitoring-plugins-b5e7f4e6cc8c586fdb20949369e05105157a61a7.tar.gz
Merge pull request #2174 from RincewindsHat/modern_output/check_mysql
Modern output/check mysql
Diffstat (limited to 'plugins/t')
-rw-r--r--plugins/t/check_mysql.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/t/check_mysql.t b/plugins/t/check_mysql.t
index a383bc99..9114cccc 100644
--- a/plugins/t/check_mysql.t
+++ b/plugins/t/check_mysql.t
@@ -11,6 +11,7 @@
11# mysql -u$user -p$password -h$host $db 11# mysql -u$user -p$password -h$host $db
12 12
13use strict; 13use strict;
14use warnings;
14use Test::More; 15use Test::More;
15use NPTest; 16use NPTest;
16 17
@@ -40,7 +41,7 @@ SKIP: {
40 41
41 $result = NPTest->testCmd("./check_mysql -S -H $mysqlserver $mysql_login_details"); 42 $result = NPTest->testCmd("./check_mysql -S -H $mysqlserver $mysql_login_details");
42 cmp_ok( $result->return_code, "==", 1, "No replicas defined" ); 43 cmp_ok( $result->return_code, "==", 1, "No replicas defined" );
43 like( $result->output, "/No replicas defined/", "Correct error message"); 44 like( $result->output, "/no replicas defined/", "Correct error message");
44} 45}
45 46
46SKIP: { 47SKIP: {
@@ -54,7 +55,7 @@ SKIP: {
54 55
55 $result = NPTest->testCmd("./check_mysql -S -s $mysqlsocket $mysql_login_details"); 56 $result = NPTest->testCmd("./check_mysql -S -s $mysqlsocket $mysql_login_details");
56 cmp_ok( $result->return_code, "==", 1, "No replicas defined" ); 57 cmp_ok( $result->return_code, "==", 1, "No replicas defined" );
57 like( $result->output, "/No replicas defined/", "Correct error message"); 58 like( $result->output, "/no replicas defined/", "Correct error message");
58} 59}
59 60
60SKIP: { 61SKIP: {
@@ -70,5 +71,5 @@ SKIP: {
70 71
71 $result = NPTest->testCmd("./check_mysql -S -H $with_replica $with_replica_login -w 60:"); 72 $result = NPTest->testCmd("./check_mysql -S -H $with_replica $with_replica_login -w 60:");
72 cmp_ok( $result->return_code, '==', 1, 'Alert warning if < 60 seconds behind'); 73 cmp_ok( $result->return_code, '==', 1, 'Alert warning if < 60 seconds behind');
73 like( $result->output, "/^SLOW_REPLICA WARNING:/", "Output okay"); 74 like( $result->output, "/^slow_replica/", "Output okay");
74} 75}