@@ -116,23 +116,22 @@ subtest 'Release Indexing' => sub {
116116 # run the release indexing script for a tarball
117117 ` perl $release_script $release_file ` ;
118118
119- my $es_file = MetaCPAN::ES-> new( index => ' file' );
120- my $file_search_total = $es_file -> search (
119+ my $es_file = MetaCPAN::ES-> new( index => ' file' );
120+ my $file_count = $es_file -> count (
121121 body => {
122122 query => { match => { release => ' HTML-Parser-3.83' } },
123123 }
124- )-> {hits }{ total };
125- ok( $file_search_total > 0, " Found files for HTML-Parser-3.83" );
124+ )-> {count };
125+ ok( $file_count > 0, " Found ( $file_count ) files for HTML-Parser-3.83" );
126126
127- my $es_release = MetaCPAN::ES-> new( index => ' release' );
128- my $release_search_total = $es_release -> search (
127+ my $es_release = MetaCPAN::ES-> new( index => ' release' );
128+ my $release_count = $es_release -> count (
129129 body => {
130130 query => { match => { name => ' HTML-Parser-3.83' } },
131131 }
132- )-> {hits }{ total };
132+ )-> {count };
133133
134- ok( $release_search_total == 1,
135- " Found release entries for HTML-Parser-3.83" );
134+ ok( $release_count == 1, " Found ($release_count ) release entries for HTML-Parser-3.83" );
136135};
137136
138137subtest ' Cover Indexing' => sub {
@@ -147,8 +146,22 @@ subtest 'Cover Indexing' => sub {
147146 " Found cover data for HTML-Parser-3.83" );
148147};
149148
149+ subtest ' Contributor Indexing' => sub {
150+ my $contributor_script = $d_bin -> child(' contributor.pl' );
151+
152+ # run the contributor indexing script
153+ ` perl $contributor_script -release OALDERS/HTML-Parser-3.83` ;
154+
155+ my $es_contributor = MetaCPAN::ES-> new( index => ' contributor' );
156+ my $contributor_count = $es_contributor -> count(
157+ body => {
158+ query => { match => { release_name => ' HTML-Parser-3.83' } },
159+ }
160+ )-> {count };
161+ ok( $contributor_count > 0, " Found ($contributor_count ) contributors for HTML-Parser-3.83" );
162+ };
163+
150164# TODO:
151- # contributor
152165# cve
153166# favorite
154167
0 commit comments