Skip to content

Commit

Permalink
run plugin tests for local non-enabled plugins too
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Oct 8, 2024
1 parent c037e6a commit 6404b69
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion t/800-plugins.t
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 6404b69

Please sign in to comment.