1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
Description: Load Nagios::CheckLogfiles::Search::Eventlog only if we are on Windows.
Forwarded: https://github.com/lausser/check_logfiles/pull/77
Author: Hilmar Preuße <hille42@web.de>
Last-Update: 2023-01-19
--- check_logfiles.orig/t/040wevtutilfilt.t
+++ check_logfiles/t/040wevtutilfilt.t
@@ -10,7 +10,6 @@
use Cwd;
use lib "../plugins-scripts";
use Nagios::CheckLogfiles::Test;
-use Nagios::CheckLogfiles::Search::Eventlog;
use constant TESTDIR => ".";
use Data::Dumper;
@@ -31,6 +30,8 @@
plan tests => 4;
}
+use Nagios::CheckLogfiles::Search::Eventlog;
+
my $cl = Nagios::CheckLogfiles::Test->new({
protocolsdir => TESTDIR."/var/tmp",
seekfilesdir => TESTDIR."/var/tmp",
--- check_logfiles.orig/t/041wevtutil.t
+++ check_logfiles/t/041wevtutil.t
@@ -10,7 +10,6 @@
use Cwd;
use lib "../plugins-scripts";
use Nagios::CheckLogfiles::Test;
-use Nagios::CheckLogfiles::Search::Eventlog;
use constant TESTDIR => ".";
if (($^O ne "cygwin") and ($^O !~ /MSWin/)) {
@@ -20,6 +19,8 @@
plan tests => 12;
}
+use Nagios::CheckLogfiles::Search::Eventlog;
+
my $cl = Nagios::CheckLogfiles::Test->new({
protocolsdir => TESTDIR."/var/tmp",
seekfilesdir => TESTDIR."/var/tmp",
--- check_logfiles.orig/t/041wevtutilps.t
+++ check_logfiles/t/041wevtutilps.t
@@ -10,7 +10,6 @@
use Cwd;
use lib "../plugins-scripts";
use Nagios::CheckLogfiles::Test;
-use Nagios::CheckLogfiles::Search::Eventlog;
use constant TESTDIR => ".";
if (($^O ne "cygwin") and ($^O !~ /MSWin/)) {
@@ -20,6 +19,8 @@
plan tests => 7;
}
+use Nagios::CheckLogfiles::Search::Eventlog;
+
######################################################
#
# powershell -Command "echo hihi"
|