Skip to content

Commit

Permalink
Fix RH Cloud connector test
Browse files Browse the repository at this point in the history
  • Loading branch information
jameerpathan111 committed Jan 29, 2024
1 parent 362c6e8 commit 38ed84b
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions tests/foreman/ui/test_rhc.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from datetime import datetime, timedelta

from fauxfactory import gen_string
from manifester import Manifester
import pytest

from robottelo import constants
Expand Down Expand Up @@ -60,16 +61,29 @@ def module_rhc_org(module_target_sat):
return org


@pytest.fixture(scope='module')
def module_rhc_manifest(module_target_sat, module_rhc_org):
"""Returns a manifest in sca mode with subscriptions determined by the
'manifest_category.extra_rhel_entitlement` setting in conf/manifest.yaml.
Used only for RH Cloud connector test."""
rhcloud_manifest = Manifester(
allocation_name=module_rhc_org.name,
manifest_category=settings.manifest.extra_rhel_entitlement,
simple_content_access="enabled",
)
return rhcloud_manifest.get_manifest()


@pytest.fixture
def fixture_setup_rhc_satellite(
request,
module_target_sat,
module_rhc_org,
module_extra_rhel_sca_manifest,
module_rhc_manifest,
):
"""Create Organization and activation key after successful test execution"""
if settings.rh_cloud.crc_env == 'prod':
module_target_sat.upload_manifest(module_rhc_org.id, module_extra_rhel_sca_manifest.content)
module_target_sat.upload_manifest(module_rhc_org.id, module_rhc_manifest.content)
yield
if request.node.rep_call.passed:
# Enable and sync required repos
Expand Down

0 comments on commit 38ed84b

Please sign in to comment.