Add KrillIndexer plugin
Change-Id: Iadce86ca87637c6fbd970f1fd7672ff946f31a98
diff --git a/t/plugin/krill-indexer.t b/t/plugin/krill-indexer.t
new file mode 100644
index 0000000..4098e70
--- /dev/null
+++ b/t/plugin/krill-indexer.t
@@ -0,0 +1,39 @@
+use Test::More;
+use Test::Mojo;
+use Test::Output;
+
+my $java = `sh -c 'command -v java'`;
+chomp $java;
+
+if ($java eq '') {
+ plan skip_all => "Java is not installed";
+ return;
+};
+
+unless ($ENV{KRILL_INDEXER_PATH}) {
+ plan skip_all => "Krill-Indexer is not installed";
+ return;
+};
+
+my $t = Test::Mojo->new(Kalamar => {
+ Kalamar => {
+ plugins => ['KrillIndexer']
+ }
+});
+
+my $app = $t->app;
+
+my $cmds = $app->commands;
+
+ok(grep/::KrillIndexer/, @{$cmds->namespaces}, 'Namespace is set');
+
+stdout_like(
+ sub {
+ $cmds->run('krill-indexer');
+ },
+ qr{--inputDir}
+);
+
+done_testing;
+
+1;