Skip to content

Commit 968a062

Browse files
committed
testserver: get mapping via esconfig
1 parent 8ab77ec commit 968a062

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/lib/MetaCPAN/TestServer.pm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package MetaCPAN::TestServer;
22

33
use MetaCPAN::Moose;
44

5+
use MetaCPAN::ESConfig qw( es_config );
56
use MetaCPAN::Script::Author ();
67
use MetaCPAN::Script::Cover ();
78
use MetaCPAN::Script::CPANTestersAPI ();
@@ -283,7 +284,7 @@ sub test_index_missing {
283284
my $self = $_[0];
284285

285286
subtest 'missing index' => sub {
286-
my $scoverindexjson = MetaCPAN::Script::Mapping::Cover::mapping;
287+
my $cover_mapping_json = encode_json( es_config->mapping('cover') );
287288

288289
subtest 'delete cover index' => sub {
289290
local @ARGV = qw(mapping --delete_index cover);
@@ -298,7 +299,7 @@ sub test_index_missing {
298299
local @ARGV = (
299300
'mapping', '--create_index',
300301
'cover', '--patch_mapping',
301-
qq({ "cover": $scoverindexjson })
302+
qq({ "cover": $cover_mapping_json })
302303
);
303304
my $mapping
304305
= MetaCPAN::Script::Mapping->new_with_options(

0 commit comments

Comments
 (0)