Skip to content

Commit

Permalink
[6.13.z] Remove old skip_if for closed BZs (#15377)
Browse files Browse the repository at this point in the history
Remove old skip_if for closed BZs
  • Loading branch information
vsedmik authored Jun 7, 2024
1 parent a378658 commit f81c9c1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 39 deletions.
34 changes: 16 additions & 18 deletions tests/foreman/api/test_capsulecontent.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
get_repomd,
get_repomd_revision,
)
from robottelo.utils.issue_handlers import is_open


@pytest.mark.run_in_one_thread
Expand Down Expand Up @@ -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')
Expand Down
16 changes: 7 additions & 9 deletions tests/foreman/api/test_reporttemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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"])
Expand Down
4 changes: 1 addition & 3 deletions tests/foreman/cli/test_activationkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
parametrized,
valid_data_list,
)
from robottelo.utils.issue_handlers import is_open


@pytest.fixture(scope='module')
Expand Down Expand Up @@ -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(
{
Expand Down
8 changes: 2 additions & 6 deletions tests/foreman/ui/test_contenthost.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down Expand Up @@ -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})
Expand Down
4 changes: 1 addition & 3 deletions tests/upgrades/test_virtwho.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 (
Expand Down

0 comments on commit f81c9c1

Please sign in to comment.