diff --git a/robottelo/constants/__init__.py b/robottelo/constants/__init__.py index 63ae6f6d914..b6dab6b2101 100644 --- a/robottelo/constants/__init__.py +++ b/robottelo/constants/__init__.py @@ -2149,7 +2149,6 @@ class Colored(Box): 'option is not present in the /etc/dnf/dnf.conf' ) - # Data File Paths class DataFile(Box): """The boxed Data directory class with its attributes pointing to the Data directory files""" diff --git a/robottelo/constants/repos.py b/robottelo/constants/repos.py index 9738894a689..a0b2a8adeec 100644 --- a/robottelo/constants/repos.py +++ b/robottelo/constants/repos.py @@ -25,6 +25,6 @@ FAKE_0_YUM_REPO_STRING_BASED_VERSIONS = ( 'https://fixtures.pulpproject.org/rpm-string-version-updateinfo/' ) - +FAKE_ZST_REPO = 'https://fixtures.pulpproject.org/rpm-zstd-metadata' ANSIBLE_GALAXY = 'https://galaxy.ansible.com/' ANSIBLE_HUB = 'https://cloud.redhat.com/api/automation-hub/' diff --git a/tests/foreman/api/test_repositories.py b/tests/foreman/api/test_repositories.py index 9c577dd7349..68dc13b0657 100644 --- a/tests/foreman/api/test_repositories.py +++ b/tests/foreman/api/test_repositories.py @@ -18,7 +18,12 @@ from robottelo import constants from robottelo.config import settings -from robottelo.constants import DEFAULT_ARCHITECTURE, MIRRORING_POLICIES, REPOS +from robottelo.constants import ( + DEFAULT_ARCHITECTURE, + MIRRORING_POLICIES, + REPOS, +) +from robottelo.constants.repos import FAKE_ZST_REPO from robottelo.exceptions import CLIReturnCodeError from robottelo.utils.datafactory import parametrized @@ -186,6 +191,39 @@ def test_positive_sync_kickstart_repo(module_sca_manifest_org, target_sat): assert rh_repo.content_counts['rpm'] > 0 +def test_positive_sync_upstream_repo_with_zst_compression( + module_org, module_product, module_target_sat +): + """Sync upstream repo having zst compression and verify it succeeds. + + :id: 1eddff2a-b6b5-420b-a0e8-ba6a05c11ca4 + + :expectedresults: Repo sync is successful and no zst type compression errors are present in /var/log/messages. + + :steps: + + 1. Sync upstream repository having zst type compression. + 2. Assert that no errors related to compression type are present in + /var/log/messages. + 3. Assert that sync was executed properly. + + :BZ: 2241934 + + :customerscenario: true + """ + repo = module_target_sat.api.Repository( + product=module_product, content_type='yum', url=FAKE_ZST_REPO + ).create() + assert repo.read().content_counts['rpm'] == 0 + sync = module_product.sync() + assert sync['result'] == 'success' + assert repo.read().content_counts['rpm'] > 0 + result = module_target_sat.execute( + 'grep pulp /var/log/messages | grep "Cannot detect compression type"' + ) + assert result.status == 1 + + @pytest.mark.tier1 def test_negative_upload_expired_manifest(module_org, target_sat): """Upload an expired manifest and attempt to refresh it