@@ -25,13 +25,13 @@ my $modules = $test_dir->child('modules');
2525
2626my @files = qw<
2727 00whois.xml
28- 02packages.details.txt
28+ 02packages.details.txt.gz
2929 06perms.txt
3030> ;
3131
3232subtest ' Check Files' => sub {
3333 ok( $authors -> child(' 00whois.xml' ), " Found 00whois.xml" );
34- ok( $modules -> child(' 02packages.details.txt' ), " Found 02packages.details.txt" );
34+ ok( $modules -> child(' 02packages.details.txt.gz ' ), " Found 02packages.details.txt.gz " );
3535 ok( $modules -> child(' 06perms.txt' ), " Found 06perms.txt" );
3636};
3737
@@ -82,6 +82,16 @@ subtest 'Author Indexing' => sub {
8282 ok( $es_author -> exists ( index => ' author' , id => ' OALDERS' ), " Found author OALDERS" );
8383};
8484
85+ # run the package indexing script in test mode
86+ my $package_script = $bin -> child(' package.pl' );
87+ my $package_file = $modules -> child(' 02packages.details.txt.gz' );
88+ ` perl $package_script -package_file $package_file --mode test` ;
89+
90+ subtest ' Package Indexing' => sub {
91+ my $es_package = MetaCPAN::ES-> new( index => ' package' , mode => ' test' );
92+ ok( $es_package -> exists ( index => ' package' , id => ' LWP' ), " Found package LWP" );
93+ };
94+
8595# run the permission indexing script in test mode
8696my $perms_script = $bin -> child(' permission.pl' );
8797my $perms_file = $modules -> child(' 06perms.txt' );
0 commit comments