Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Add redirection ignore regex
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeep-krishnamurthy committed Sep 11, 2018
1 parent 1e9276a commit 668bd03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/nightly/broken_link_checker_test/test_broken_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def prepare_link_test_result(command_output):
HTTP_403_REGEX = "(HTTP_403)"
HTTP_401_REGEX = "(HTTP_401)"
HTTP_409_REGEX = "(HTTP_409)"
HTTP_3XX_REGEX = "(HTTP_3"
BLC_UNKNOWN_REGEX = "(BLC_UNKNOWN)"
HTTP_UNDEFINED = "HTTP_undefined"
FALSE_SCALA_API_DOC_LINK = "java$lang.html"
Expand All @@ -55,7 +56,7 @@ def prepare_link_test_result(command_output):

if line.find(BROKEN_PAGE_START_REGEX) != -1:
# Skip (401, 403, 409, unknown issues)
if HTTP_403_REGEX not in line and HTTP_401_REGEX not in line and HTTP_409_REGEX not in line and BLC_UNKNOWN_REGEX not in line and HTTP_UNDEFINED not in line and FALSE_SCALA_API_DOC_LINK not in line and FALSE_SCALA_API_DEPRECATED_LINK not in line and FALSE_PAPER_LINK not in line:
if HTTP_403_REGEX not in line and HTTP_401_REGEX not in line and HTTP_409_REGEX not in line and HTTP_3XX_REGEX not in line and BLC_UNKNOWN_REGEX not in line and HTTP_UNDEFINED not in line and FALSE_SCALA_API_DOC_LINK not in line and FALSE_SCALA_API_DEPRECATED_LINK not in line and FALSE_PAPER_LINK not in line:
current_page_broken = True
current_page_broken_links += line.split(BROKEN_PAGE_START_REGEX)[1] + "\n"

Expand Down

0 comments on commit 668bd03

Please sign in to comment.