summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build.PL7
-rwxr-xr-xbin/icli4
-rwxr-xr-xt/00-compile.t4
3 files changed, 11 insertions, 4 deletions
diff --git a/Build.PL b/Build.PL
index 48a27ff..e1b05d5 100644
--- a/Build.PL
+++ b/Build.PL
@@ -22,7 +22,7 @@ my @command_paths = (
my $build = Module::Build->new(
build_requires => {
'Test::More' => 0,
- 'Test::Compile' => 0,
+ 'Test::Compile' => "1.3.0",
'Test::Pod' => 0,
'Test::Command' => 0,
},
@@ -56,6 +56,11 @@ my $build = Module::Build->new(
test_types => {
author => '.at',
},
+ meta_merge => {
+ resources => {
+ repository => 'https://github.com/derf/icli'
+ }
+ },
);
print <<'EOF';
diff --git a/bin/icli b/bin/icli
index d450b98..cac57b4 100755
--- a/bin/icli
+++ b/bin/icli
@@ -1195,7 +1195,7 @@ sub display_overview {
}
sub dispatch_command {
- my $str = join( ';', @_ );
+ my $str = join( ';', @_ ) . "\n";
open( my $cmd_fh, '>', $rw_file )
or die( "Failed to open icinga command file ($rw_file): $!\n"
@@ -1291,7 +1291,7 @@ sub action_on_service {
time() );
say "Scheduled forced check of '$service' on '$host'";
}
- when ('Acknowledge') {
+ when ('acknowledge') {
dispatch_command( 'ACKNOWLEDGE_SVC_PROBLEM', $host, $service, 2, 1,
1, 'cli', $action_args[0] );
say "Acknowledged $host/$service: $action_args[0]";
diff --git a/t/00-compile.t b/t/00-compile.t
index 31e3f3e..e430701 100755
--- a/t/00-compile.t
+++ b/t/00-compile.t
@@ -5,4 +5,6 @@ use 5.010;
use Test::More;
use Test::Compile;
-all_pl_files_ok('bin/icli');
+my $test = Test::Compile->new();
+$test->all_files_ok('bin/icli');
+$test->done_testing();