Created
February 3, 2022 13:25
-
-
Save rplevka/acb3df812b2ec0f950ef4eec81a0378f to your computer and use it in GitHub Desktop.
Revisions
-
rplevka created this gist
Feb 3, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,51 @@ @pytest.fixture(scope='function') def rh_repo(module_manifest_org, rhel_contenthost): # rh_major = rhel_contenthost.os_version.major rh_major = 8 # the rhel version of the enabled reposet does not matter to us rh_repo_id = enable_rhrepo_and_fetchid( basearch='x86_64', org_id=module_manifest_org.id, product=PRDS[f'rhel{rh_major if rh_major > 7 else ""}'], repo=REPOS['rhst7']['name'], reposet=REPOSET[f'rhst{rh_major}'], releasever=None, ) rh_repo = entities.Repository(id=rh_repo_id).read() rh_repo.sync() return rh_repo @pytest.fixture(scope='function') def ak(module_manifest_org, rh_repo, custom_repo): """rh_repo and custom_repo are included here to ensure their execution before the AK""" ak = entities.ActivationKey( content_view=module_manifest_org.default_content_view, max_hosts=100, organization=module_manifest_org, environment=entities.LifecycleEnvironment(id=module_manifest_org.library.id), auto_attach=True, ).create() return ak # test: @pytest.mark.tier2 @pytest.mark.pit_client @pytest.mark.pit_server @pytest.mark.rhel_ver_list([8]) def test_sca_end_to_end(ak, rhel_contenthost, module_manifest_org, rh_repo, custom_repo, default_sat): """Perform end to end testing for Simple Content Access Mode :id: c6c4b68c-a506-46c9-bd1d-22e4c1926ef8 :BZ: 1890643, 1890661, 1890664 :expectedresults: All tests pass and clients have access to repos without needing to add subscriptions :parametrized: yes :CaseImportance: Critical """ ...