Skip to content

Commit 32a84dc

Browse files
committed
gui_crawl: skip checking bulk_rename_host links
The host renaming page contains a button that redirects to the results of the most recent host renaming job. If no renaming jobs have been run previously, clicking this link leads to a non-existent page and triggers an error. Skip checking this link during GUI crawling. Change-Id: I21a262a313ae9df9944d9e9c5b6f5c2eda13d368 (cherry picked from commit 7d33740)
1 parent 4975ca9 commit 32a84dc

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

tests/testlib/crawler.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,16 @@ def __init__(self, test_site: Site, report_file: str | None, max_urls: int = 0)
186186
"text/x-chdr",
187187
"text/x-sh",
188188
}
189-
self._ignored_urls: dict[SkipReason, list[RelativeUrl]] = {}
189+
self._ignored_urls: dict[SkipReason, list[RelativeUrl]] = {
190+
# bulk_rename_host always links to the "rename-hosts" job details page, even though
191+
# the crawler never actually runs that job, so the link legitimately errors.
192+
"bulk_rename_host job never ran during crawl": [
193+
"wato.py?back_url=wato.py%3Ffolder%3D%26mode%3Dbulk_rename_host&job_id=rename-hosts&mode=background_job_details",
194+
"wato.py?back_url=wato.py%3Ffolder%3D%26kiosk%3Dtrue%26mode%3Dbulk_rename_host&job_id=rename-hosts&mode=background_job_details",
195+
"index.py?kiosk=true&start_url=wato.py%3Fback_url%3Dwato.py%253Ffolder%253D%2526mode%253Dbulk_rename_host%26job_id%3Drename-hosts%26mode%3Dbackground_job_details",
196+
"index.py?kiosk=true&start_url=wato.py%3Fback_url%3Dwato.py%253Ffolder%253D%2526kiosk%253Dtrue%2526mode%253Dbulk_rename_host%26job_id%3Drename-hosts%26mode%3Dbackground_job_details",
197+
],
198+
}
190199
# override value using environment-variable
191200
maxlen = int(os.environ.get("GUI_CRAWLER_URL_LIMIT", "0")) or max_urls
192201
# limit minimum value to 0.

0 commit comments

Comments
 (0)