blob: 4098e70a24af0581c254675e109cfd2d7a2a1dd0 [file] [log] [blame]
Akronb4279922022-12-12 12:42:31 +01001use Test::More;
2use Test::Mojo;
3use Test::Output;
4
5my $java = `sh -c 'command -v java'`;
6chomp $java;
7
8if ($java eq '') {
9 plan skip_all => "Java is not installed";
10 return;
11};
12
13unless ($ENV{KRILL_INDEXER_PATH}) {
14 plan skip_all => "Krill-Indexer is not installed";
15 return;
16};
17
18my $t = Test::Mojo->new(Kalamar => {
19 Kalamar => {
20 plugins => ['KrillIndexer']
21 }
22});
23
24my $app = $t->app;
25
26my $cmds = $app->commands;
27
28ok(grep/::KrillIndexer/, @{$cmds->namespaces}, 'Namespace is set');
29
30stdout_like(
31 sub {
32 $cmds->run('krill-indexer');
33 },
34 qr{--inputDir}
35);
36
37done_testing;
38
391;