diff --git a/conf/robottelo.yaml.template b/conf/robottelo.yaml.template index bb67c31a3d..200563d55e 100644 --- a/conf/robottelo.yaml.template +++ b/conf/robottelo.yaml.template @@ -29,3 +29,5 @@ ROBOTTELO: SETTINGS: GET_FRESH: true IGNORE_VALIDATION_ERRORS: false + # Stage docs url + STAGE_DOCS_URL: https://docs.redhat.com diff --git a/robottelo/config/validators.py b/robottelo/config/validators.py index b7c3817b42..47b13ba41a 100644 --- a/robottelo/config/validators.py +++ b/robottelo/config/validators.py @@ -321,6 +321,7 @@ Validator('remotedb.port', default=5432), ], robottelo=[ + Validator('robottelo.stage_docs_url', default='https://docs.redhat.com'), Validator('robottelo.settings.ignore_validation_errors', is_type_of=bool, default=False), Validator('robottelo.rhel_source', default='ga', is_in=['ga', 'internal']), Validator( diff --git a/tests/foreman/ui/test_documentation_links.py b/tests/foreman/ui/test_documentation_links.py index b1e34b7ea8..3d11b8cd86 100644 --- a/tests/foreman/ui/test_documentation_links.py +++ b/tests/foreman/ui/test_documentation_links.py @@ -22,10 +22,6 @@ @pytest.mark.e2e -@pytest.mark.skipif( - (settings.server.version.release.split('.')[0:2] in settings.robottelo.sat_non_ga_versions), - reason="The test don't yet support verifying documentation links for non GA'ed Satellite release.", -) def test_positive_documentation_links(target_sat): """Verify that Satellite documentation links are working. Note: At the moment, the test doesn't support verifying links hidden behind a button. @@ -67,6 +63,7 @@ def test_positive_documentation_links(target_sat): 'factvalue', 'dashboard', ] + sat_version = ".".join(target_sat.version.split('.')[0:2]) all_links = defaultdict(list) pages_with_broken_links = defaultdict(list) with target_sat.ui_session() as session: @@ -86,6 +83,12 @@ def test_positive_documentation_links(target_sat): ) for page in pages: for link in all_links[page]: + # Test stage docs url for Non-GA'ed Satellite + if sat_version in settings.robottelo.sat_non_ga_versions: + link = link.replace( + 'https://docs.redhat.com', settings.robottelo.stage_docs_url + ) + link = link.replace('html', 'html-single') if requests.get(link, verify=False).status_code != 200: pages_with_broken_links[page].append(link) logger.info(f"Following link on {page} page seems broken: \n {link}")