From f81c9c1ad561c5644261396366dce49a01576500 Mon Sep 17 00:00:00 2001 From: vsedmik <46570670+vsedmik@users.noreply.github.com> Date: Fri, 7 Jun 2024 17:35:25 +0200 Subject: [PATCH] [6.13.z] Remove old skip_if for closed BZs (#15377) Remove old skip_if for closed BZs --- tests/foreman/api/test_capsulecontent.py | 34 +++++++++++------------ tests/foreman/api/test_reporttemplates.py | 16 +++++------ tests/foreman/cli/test_activationkey.py | 4 +-- tests/foreman/ui/test_contenthost.py | 8 ++---- tests/upgrades/test_virtwho.py | 4 +-- 5 files changed, 27 insertions(+), 39 deletions(-) diff --git a/tests/foreman/api/test_capsulecontent.py b/tests/foreman/api/test_capsulecontent.py index dd9868716f7..800535b965b 100644 --- a/tests/foreman/api/test_capsulecontent.py +++ b/tests/foreman/api/test_capsulecontent.py @@ -30,7 +30,6 @@ get_repomd, get_repomd_revision, ) -from robottelo.utils.issue_handlers import is_open @pytest.mark.run_in_one_thread @@ -925,26 +924,25 @@ def test_positive_sync_container_repo_end_to_end( assert result.status == 0 # Inspect the images with skopeo (BZ#2148813) - if not is_open('BZ:2148813'): - result = module_capsule_configured.execute('yum -y install skopeo') - assert result.status == 0 + result = module_capsule_configured.execute('yum -y install skopeo') + assert result.status == 0 - target_sat.api.LifecycleEnvironment( - id=function_lce.id, registry_unauthenticated_pull='true' - ).update(['registry_unauthenticated_pull']) + target_sat.api.LifecycleEnvironment( + id=function_lce.id, registry_unauthenticated_pull='true' + ).update(['registry_unauthenticated_pull']) - sleep(20) + sleep(20) - skopeo_cmd = 'skopeo --debug inspect docker://' - for path in repo_paths: - result = module_capsule_configured.execute( - f'{skopeo_cmd}{target_sat.hostname}/{path}:latest' - ) - assert result.status == 0 - result = module_capsule_configured.execute( - f'{skopeo_cmd}{module_capsule_configured.hostname}/{path}:latest' - ) - assert result.status == 0 + skopeo_cmd = 'skopeo --debug inspect docker://' + for path in repo_paths: + result = module_capsule_configured.execute( + f'{skopeo_cmd}{target_sat.hostname}/{path}:latest' + ) + assert result.status == 0 + result = module_capsule_configured.execute( + f'{skopeo_cmd}{module_capsule_configured.hostname}/{path}:latest' + ) + assert result.status == 0 @pytest.mark.tier4 @pytest.mark.skip_if_not_set('capsule') diff --git a/tests/foreman/api/test_reporttemplates.py b/tests/foreman/api/test_reporttemplates.py index a3b5ddbf03d..0d33e1a5b09 100644 --- a/tests/foreman/api/test_reporttemplates.py +++ b/tests/foreman/api/test_reporttemplates.py @@ -21,7 +21,6 @@ from robottelo.constants import DEFAULT_SUBSCRIPTION_NAME, PRDS, REPOS, REPOSET from robottelo.hosts import ContentHost from robottelo.utils.datafactory import parametrized, valid_data_list -from robottelo.utils.issue_handlers import is_open @pytest.fixture(scope='module') @@ -279,14 +278,13 @@ def test_positive_lock_clone_nodelete_unlock_report(target_sat): assert template_clone_name == cloned_rt.name assert template1 == cloned_rt.template # 4. Try to delete template - if not is_open('BZ:1680458'): - with pytest.raises(HTTPError): - rt.delete() - # In BZ1680458, exception is thrown but template is deleted anyway - assert ( - len(target_sat.api.ReportTemplate().search(query={'search': f'name="{template_name}"'})) - != 0 - ) + with pytest.raises(HTTPError): + rt.delete() + # In BZ1680458, exception is thrown but template is deleted anyway + assert ( + len(target_sat.api.ReportTemplate().search(query={'search': f'name="{template_name}"'})) + != 0 + ) # 5. Try to edit template with pytest.raises(HTTPError): target_sat.api.ReportTemplate(id=rt.id, template=template2).update(["template"]) diff --git a/tests/foreman/cli/test_activationkey.py b/tests/foreman/cli/test_activationkey.py index e6c97afc6af..20b8ecdf896 100644 --- a/tests/foreman/cli/test_activationkey.py +++ b/tests/foreman/cli/test_activationkey.py @@ -29,7 +29,6 @@ parametrized, valid_data_list, ) -from robottelo.utils.issue_handlers import is_open @pytest.fixture(scope='module') @@ -1136,8 +1135,7 @@ def test_create_ak_with_syspurpose_set(module_entitlement_manifest_org, module_t assert new_ak['system-purpose']['purpose-addons'] == "test-addon1, test-addon2" assert new_ak['system-purpose']['purpose-role'] == "test-role" assert new_ak['system-purpose']['purpose-usage'] == "test-usage" - if not is_open('BZ:1789028'): - assert new_ak['system-purpose']['service-level'] == "Self-Support" + assert new_ak['system-purpose']['service-level'] == "Self-Support" # Check that system purpose values can be deleted. module_target_sat.cli.ActivationKey.update( { diff --git a/tests/foreman/ui/test_contenthost.py b/tests/foreman/ui/test_contenthost.py index 9e944b4ce02..7faef47e4ef 100644 --- a/tests/foreman/ui/test_contenthost.py +++ b/tests/foreman/ui/test_contenthost.py @@ -35,7 +35,6 @@ VIRT_WHO_HYPERVISOR_TYPES, ) from robottelo.exceptions import CLIFactoryError -from robottelo.utils.issue_handlers import is_open from robottelo.utils.virtwho import create_fake_hypervisor_content if not setting_is_set('clients') or not setting_is_set('fake_manifest'): @@ -166,17 +165,14 @@ def test_positive_end_to_end(session, default_location, module_repos_collection_ for repo_index in range(len(module_repos_collection_with_manifest.repos_info)) } assert actual_repos == expected_repos - # Check start date for BZ#1920860 (but handle BZ#2112320 offset-by-one bug) + # Check start date for BZ#1920860 custom_product_name = module_repos_collection_with_manifest.custom_product['name'] custom_sub = next( item for item in chost['subscriptions']['resources']['assigned'] if item["Repository Name"] == custom_product_name ) - if is_open('BZ:2112320'): - assert startdate in custom_sub['Expires'] - else: - assert startdate in custom_sub['Starts'] + assert startdate in custom_sub['Starts'] # Update description new_description = gen_string('alpha') session.contenthost.update(vm.hostname, {'details.description': new_description}) diff --git a/tests/upgrades/test_virtwho.py b/tests/upgrades/test_virtwho.py index cf62e750d71..b1a7fc9bb01 100644 --- a/tests/upgrades/test_virtwho.py +++ b/tests/upgrades/test_virtwho.py @@ -16,7 +16,6 @@ import pytest from robottelo.config import settings -from robottelo.utils.issue_handlers import is_open from robottelo.utils.virtwho import ( deploy_configure_by_command, get_configure_command, @@ -146,8 +145,7 @@ def test_post_crud_virt_who_configuration(self, form_data, pre_upgrade_data, tar vhd = target_sat.api.VirtWhoConfig(organization_id=org_id).search( query={'search': f'name={form_data["name"]}'} )[0] - if not is_open('BZ:1802395'): - assert vhd.status == 'ok' + assert vhd.status == 'ok' # Verify virt-who status via CLI as we cannot check it via API now vhd_cli = target_sat.cli.VirtWhoConfig.exists(search=('name', form_data['name'])) assert (