File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -356,11 +356,12 @@ sub check_kibana_links {
356
356
# ${KIBANA_DOCS}canvas.html
357
357
# ${PLUGIN_DOCS}repository-s3.html
358
358
# ${FLEET_DOCS}fleet-overview.html
359
+ # ${APM_DOCS}overview.html
359
360
360
361
my $extractor = sub {
361
362
my $contents = shift ;
362
363
return sub {
363
- while ( $contents =~ m ! `(\$\{ (?:baseUrl|ELASTIC.+|KIBANA_DOCS|PLUGIN_DOCS|FLEET_DOCS)\} [^`]+)`! g ) {
364
+ while ( $contents =~ m ! `(\$\{ (?:baseUrl|ELASTIC.+|KIBANA_DOCS|PLUGIN_DOCS|FLEET_DOCS|APM_DOCS )\} [^`]+)`! g ) {
364
365
my $path = $1 ;
365
366
$path =~ s /\$\{ (?:DOC_LINK_VERSION|urlVersion)\} / $branch / ;
366
367
# In older versions, the variable `${ELASTIC_DOCS}` referred to
@@ -371,6 +372,7 @@ sub check_kibana_links {
371
372
$path =~ s !\$\{ KIBANA_DOCS\} ! en/kibana/$branch /! ;
372
373
$path =~ s !\$\{ PLUGIN_DOCS\} ! en/elasticsearch/plugins/$branch /! ;
373
374
$path =~ s !\$\{ FLEET_DOCS\} ! en/fleet/$branch /! ;
375
+ $path =~ s !\$\{ APM_DOCS\} ! en/apm/! ;
374
376
# Replace the "https://www.elastic.co/guide/" URL prefix so that
375
377
# it becomes a file path in the built docs.
376
378
$path =~ s !\$\{ (?:baseUrl|ELASTIC_WEBSITE_URL)\} guide/!! ;
Original file line number Diff line number Diff line change 156
156
include_examples 'there are broken links in kibana' ,
157
157
'en/fleet/master/not-a-fleet-page.html'
158
158
end
159
+ describe 'when there is a broken APM link' do
160
+ include_context 'there is a kibana link' , true ,
161
+ '${APM_DOCS}not-an-apm-page.html' , true
162
+ include_examples 'there are broken links in kibana' ,
163
+ 'en/apm/not-an-apm-page.html'
164
+ end
159
165
describe 'when using --keep_hash and --sub_dir together like a PR test' do
160
166
describe 'when there is a broken link in one of the books being built' do
161
167
convert_before do |src , dest |
You can’t perform that action at this time.
0 commit comments