Skip to content

Commit

Permalink
sca fixes for ui organization (SatelliteQE#14816)
Browse files Browse the repository at this point in the history
  • Loading branch information
pondrejk authored and jyejare committed Oct 19, 2024
1 parent b6202d8 commit ba8bbca
Showing 1 changed file with 8 additions and 30 deletions.
38 changes: 8 additions & 30 deletions tests/foreman/ui/test_organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@


@pytest.fixture(scope='module')
def module_repos_col(request, module_entitlement_manifest_org, module_lce, module_target_sat):
def module_repos_col(request, module_sca_manifest_org, module_lce, module_target_sat):
repos_collection = module_target_sat.cli_factory.RepositoryCollection(
repositories=[
# As Satellite Tools may be added as custom repo and to have a "Fully entitled" host,
# force the host to consume an RH product with adding a cdn repo.
module_target_sat.cli_factory.YumRepository(url=settings.repos.yum_0.url),
],
)
repos_collection.setup_content(module_entitlement_manifest_org.id, module_lce.id)
repos_collection.setup_content(module_sca_manifest_org.id, module_lce.id)
yield repos_collection

@request.addfinalizer
def _cleanup():
try:
module_target_sat.api.Subscription(
organization=module_entitlement_manifest_org
).delete_manifest(data={'organization_id': module_entitlement_manifest_org.id})
organization=module_sca_manifest_org
).delete_manifest(data={'organization_id': module_sca_manifest_org.id})
except Exception:
logger.exception('Exception cleaning manifest:')

Expand Down Expand Up @@ -245,7 +245,7 @@ def test_positive_update_compresource(session, module_target_sat):
@pytest.mark.skip_if_not_set('fake_manifest')
@pytest.mark.tier2
@pytest.mark.upgrade
def test_positive_delete_with_manifest_lces(session, target_sat, function_entitlement_manifest_org):
def test_positive_delete_with_manifest_lces(session, target_sat, function_sca_manifest_org):
"""Create Organization with valid values and upload manifest.
Then try to delete that organization.
Expand All @@ -255,7 +255,7 @@ def test_positive_delete_with_manifest_lces(session, target_sat, function_entitl
:CaseImportance: Critical
"""
org = function_entitlement_manifest_org
org = function_sca_manifest_org
with session:
session.organization.select(org.name)
session.lifecycleenvironment.create({'name': 'DEV'})
Expand All @@ -269,9 +269,7 @@ def test_positive_delete_with_manifest_lces(session, target_sat, function_entitl

@pytest.mark.tier2
@pytest.mark.upgrade
def test_positive_download_debug_cert_after_refresh(
session, target_sat, function_entitlement_manifest_org
):
def test_positive_download_debug_cert_after_refresh(session, target_sat, function_sca_manifest_org):
"""Create organization with valid manifest. Download debug
certificate for that organization and refresh added manifest for few
times in a row
Expand All @@ -282,7 +280,7 @@ def test_positive_download_debug_cert_after_refresh(
:CaseImportance: High
"""
org = function_entitlement_manifest_org
org = function_sca_manifest_org
try:
with session:
session.organization.select(org.name)
Expand Down Expand Up @@ -344,23 +342,3 @@ def test_positive_product_view_organization_switch(session, module_org, module_p
assert session.product.search(module_product.name)
session.organization.select(org_name="Default Organization")
assert session.product.search(module_product.name) != module_product.name


def test_positive_prepare_for_sca_only_organization(target_sat, function_entitlement_manifest_org):
"""Verify that the organization details page notifies users that Simple Content Access
will be required for all organizations in Satellite 6.16
:id: 3a6a848b-3c16-4dbb-8f52-5ea57a9a97ef
:expectedresults: The Organization details page notifies users that Simple Content Access will
be required for all organizations in Satellite 6.16
"""
with target_sat.ui_session() as session:
session.organization.select(function_entitlement_manifest_org.name)
sca_alert = session.organization.read(
function_entitlement_manifest_org.name, widget_names='primary'
)
assert (
'Simple Content Access will be required for all organizations in Satellite 6.16.'
in sca_alert['primary']['sca_alert']
)

0 comments on commit ba8bbca

Please sign in to comment.