File tree Expand file tree Collapse file tree 3 files changed +24
-10
lines changed Expand file tree Collapse file tree 3 files changed +24
-10
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,8 @@ sub document_module ( $self, %args ) {
265265 version => $version ,
266266 version_numified => numify_version($version ),
267267 };
268+
269+ return $document ;
268270}
269271
270272sub document_release ( $self , %args ) {
@@ -293,8 +295,10 @@ sub document_release ( $self, %args ) {
293295 stat => $stat ,
294296 status => $self -> {status },
295297
296- # Call in scalar context to make sure we only get one value (building a hash).
297- ( map { ( $_ => scalar $meta -> $_ ) } qw< version resources > ),
298+ # Call in scalar context to make sure we only get one value (building a hash).
299+ resources => scalar $meta -> resources,
300+ version => scalar $meta -> version,
301+ version_numified => numify_version(scalar $meta -> version),
298302 };
299303
300304 return $document ;
Original file line number Diff line number Diff line change @@ -175,16 +175,26 @@ subtest 'Contributor Indexing' => sub {
175175 " Found ($contributor_count ) contributors for HTML-Parser-3.83" );
176176};
177177
178+ subtest ' CVE Indexing' => sub {
179+ my $cve_script = $d_bin -> child(' cve.pl' );
180+ my $json = $d_test -> child(' cve_dev.json' );
181+
182+ # run the CVE indexing script
183+ ` perl $cve_script -json $json ` ;
184+
185+ my $es_cve = MetaCPAN::ES-> new( index => ' cve' );
186+ my $cve_count = $es_cve -> count(
187+ body => {
188+ query => { match => { distribution => ' HTML-Parser' } },
189+ }
190+ )-> {count };
191+ ok( $cve_count > 0,
192+ " Found ($cve_count ) test CVEs" );
193+ };
194+
178195# TODO:
179- # cve
180196# favorite
181197
182- # check test data directory
183- # - check all distros for test are there
184- # - check all other data sources are there to test all indices
185- # set ES object with (elasticsearch_test)
186- # - check object's config
187-
188198# $server->set_latest;
189199# $server->set_first;
190200# $server->prepare_user_test_data;
Original file line number Diff line number Diff line change 99 "cves" : null ,
1010 "severity" : null ,
1111 "affected_versions" : [
12- " >=1.25,<2.3.9 "
12+ " >=1.25,<4 "
1313 ],
1414 "cpansa_id" : " CPANSA-HTML-Parser-2025-0666" ,
1515 "reported" : " 2025-10-10"
You can’t perform that action at this time.
0 commit comments