@@ -7,7 +7,7 @@ use MetaCPAN::Server::Config ();
7
7
use Test::More;
8
8
9
9
my $config = MetaCPAN::Server::Config::config();
10
- my %es = ( ' --es ' => $config -> {elasticsearch_servers }, ) ;
10
+ $config -> { es } = $config -> {elasticsearch_servers };
11
11
12
12
subtest ' create, delete index' => sub {
13
13
subtest ' create index' => sub {
@@ -26,14 +26,14 @@ subtest 'create, delete index' => sub {
26
26
' --create_index' => ' mock_index' ,
27
27
' --patch_mapping' => $smockindexjson ,
28
28
);
29
- local @ARGV = ( ' mapping' , %args , %es );
29
+ local @ARGV = ( ' mapping' , %args , );
30
30
my $mapping = MetaCPAN::Script::Mapping-> new_with_options($config );
31
31
32
32
ok( $mapping -> run, " creation 'mock_index' succeeds" );
33
33
is( $mapping -> exit_code, 0, " Exit Code '0' - No Error" );
34
34
};
35
35
subtest ' info shows new index' => sub {
36
- local @ARGV = ( ' mapping' , ' --show_cluster_info' , %es , );
36
+ local @ARGV = ( ' mapping' , ' --show_cluster_info' , );
37
37
my $mapping = MetaCPAN::Script::Mapping-> new_with_options($config );
38
38
39
39
ok( $mapping -> run, " show info succeeds" );
@@ -44,14 +44,14 @@ subtest 'create, delete index' => sub {
44
44
' Created Index printed' );
45
45
};
46
46
subtest ' delete index' => sub {
47
- local @ARGV = ( ' mapping' , ' --delete_index' , ' mock_index' , %es );
47
+ local @ARGV = ( ' mapping' , ' --delete_index' , ' mock_index' , );
48
48
my $mapping = MetaCPAN::Script::Mapping-> new_with_options($config );
49
49
50
50
ok( $mapping -> run, " deletion 'mock_index' succeeds" );
51
51
is( $mapping -> exit_code, 0, " Exit Code '0' - No Error" );
52
52
};
53
53
subtest ' info does not show deleted index' => sub {
54
- local @ARGV = ( ' mapping' , ' --show_cluster_info' , %es , );
54
+ local @ARGV = ( ' mapping' , ' --show_cluster_info' , );
55
55
my $mapping = MetaCPAN::Script::Mapping-> new_with_options($config );
56
56
57
57
ok( $mapping -> run, " show info succeeds" );
0 commit comments