From 6404b69e68bb425d7d77df065297d801a896619e Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Tue, 8 Oct 2024 12:52:27 +0200 Subject: [PATCH] run plugin tests for local non-enabled plugins too --- t/800-plugins.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/t/800-plugins.t b/t/800-plugins.t index 958256c9d..8dfb3c7a2 100644 --- a/t/800-plugins.t +++ b/t/800-plugins.t @@ -17,13 +17,19 @@ BEGIN { } my $BIN = defined $ENV{'THRUK_BIN'} ? $ENV{'THRUK_BIN'} : './script/thruk'; -$BIN = $BIN.' --local'; my $plugins = [ { name => 'omd', 'tarball' => 'https://github.com/sni/thruk-plugin-omd/archive/refs/heads/master.tar.gz' }, { name => 'pansnaps', 'tarball' => 'https://github.com/ConSol/thruk-plugin-pansnaps/archive/refs/heads/master.tar.gz' }, { name => 'woshsh', 'tarball' => 'https://github.com/sni/thruk-plugin-woshsh/archive/refs/heads/master.tar.gz' }, ]; +# add all available local plugins which are not yet enabled already anyway +my $enabled = Thruk::Base::array2hash([map({ Thruk::Base::basename($_) } (split/\n/mx ,`grep plugins/plugins-enabled/ MANIFEST`))]); +my @available = map({ Thruk::Base::basename($_) } glob("plugins/plugins-available/*")); +for my $a (reverse sort @available) { + unshift @{$plugins}, { name => $a } unless $enabled->{$a}; +} + my $filter = $ARGV[0]; my $extra_tests = [ 't/081-modules.t',