Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.13.z] Fix ACS tests/fixures by avoiding zst repos #14062

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions pytest_fixtures/component/acs.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Alternate Content Sources fixtures
import pytest

from robottelo.constants.repos import CUSTOM_FILE_REPO, CUSTOM_RPM_REPO
from robottelo.config import settings


@pytest.fixture(scope='module')
def module_yum_repo(module_target_sat, module_org):
product = module_target_sat.api.Product(organization=module_org).create()
repo = module_target_sat.api.Repository(
product=product, content_type='yum', url=CUSTOM_RPM_REPO
product=product,
content_type='yum',
url=settings.repos.yum_0.url,
).create()
repo.sync()
return repo
Expand All @@ -18,7 +20,9 @@ def module_yum_repo(module_target_sat, module_org):
def module_file_repo(module_target_sat, module_org):
product = module_target_sat.api.Product(organization=module_org).create()
repo = module_target_sat.api.Repository(
product=product, content_type='file', url=CUSTOM_FILE_REPO
product=product,
content_type='file',
url=settings.repos.file_type_repo.url,
).create()
repo.sync()
return repo
5 changes: 2 additions & 3 deletions robottelo/constants/repos.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""Only External Repos url specific constants module"""

PULP_FIXTURE_ROOT = 'https://fixtures.pulpproject.org/'
PULP_SUBPATHS_COMBINED = {
'yum': ['rpm-zchunk/', 'rpm-modular/'],
'file': ['file-large/', 'file-many/'],
'yum': ['fake_yum0/', 'fake_yum1/'],
'file': ['pulp_remote/'],
}
CUSTOM_3RD_PARTY_REPO = 'http://repo.calcforge.org/fedora/21/x86_64/'
CUSTOM_FILE_REPO = 'https://fixtures.pulpproject.org/file/'
Expand Down
5 changes: 3 additions & 2 deletions tests/foreman/api/test_acs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
import pytest
from requests.exceptions import HTTPError

from robottelo.constants.repos import PULP_FIXTURE_ROOT, PULP_SUBPATHS_COMBINED
from robottelo.config import settings
from robottelo.constants.repos import PULP_SUBPATHS_COMBINED


@pytest.mark.e2e
Expand Down Expand Up @@ -66,7 +67,7 @@ def test_positive_CRUD_all_types(
else:
params.update(
{
'base_url': PULP_FIXTURE_ROOT,
'base_url': settings.robottelo.REPOS_HOSTING_URL,
'subpaths': PULP_SUBPATHS_COMBINED[cnt_type],
'verify_ssl': 'false',
}
Expand Down
9 changes: 5 additions & 4 deletions tests/foreman/cli/test_acs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
from fauxfactory import gen_alphanumeric
import pytest

from robottelo.constants.repos import PULP_FIXTURE_ROOT, PULP_SUBPATHS_COMBINED
from robottelo.config import settings
from robottelo.constants.repos import PULP_SUBPATHS_COMBINED
from robottelo.exceptions import CLIReturnCodeError

ACS_UPDATED = 'Alternate Content Source updated.'
Expand Down Expand Up @@ -74,7 +75,7 @@ def test_positive_CRUD_all_types(
else:
params.update(
{
'base-url': PULP_FIXTURE_ROOT,
'base-url': settings.robottelo.REPOS_HOSTING_URL,
'subpaths': PULP_SUBPATHS_COMBINED[cnt_type],
'verify-ssl': 'false',
}
Expand Down Expand Up @@ -179,7 +180,7 @@ def test_negative_check_custom_rhui_validations(module_target_sat, acs_type, mod
{
'name': gen_alphanumeric(),
'alternate-content-source-type': acs_type,
'base-url': PULP_FIXTURE_ROOT,
'base-url': settings.robottelo.REPOS_HOSTING_URL,
'verify-ssl': 'false',
'product-ids': module_yum_repo.product.id,
}
Expand Down Expand Up @@ -217,7 +218,7 @@ def test_negative_check_simplified_validations(
'content-type': cnt_type,
'smart-proxy-ids': module_target_sat.nailgun_capsule.id,
# forbidden options
'base-url': PULP_FIXTURE_ROOT,
'base-url': settings.robottelo.REPOS_HOSTING_URL,
'subpaths': f'{gen_alphanumeric()}/',
'verify-ssl': 'false',
'ssl-ca-cert-id': '1',
Expand Down
Loading