Skip to content

Commit

Permalink
CC Automation/Comp Eval coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
sambible committed Apr 30, 2024
1 parent 30d98c7 commit db5d817
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/foreman/api/test_contentview.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,11 @@ def test_positive_add_sha512_rpm(self, content_view, module_org, module_target_s

@pytest.mark.tier2
def test_ccv_promote_registry_name_change(
<<<<<<< HEAD
self, module_target_sat, module_sca_manifest_org
=======
self, module_target_sat, module_entitlement_manifest_org
>>>>>>> 9c8e7f7a9 (CC Automation/Comp Eval coverage)
):
"""Testing CCV promotion scenarios where the registry_name has been changed to some
specific value.
Expand All @@ -307,7 +311,11 @@ def test_ccv_promote_registry_name_change(
"""
rh_repo_id = module_target_sat.api_factory.enable_rhrepo_and_fetchid(
basearch=DEFAULT_ARCHITECTURE,
<<<<<<< HEAD
org_id=module_sca_manifest_org.id,
=======
org_id=module_entitlement_manifest_org.id,
>>>>>>> 9c8e7f7a9 (CC Automation/Comp Eval coverage)
product=REPOS['kickstart']['rhel8_aps']['product'],
repo=REPOS['kickstart']['rhel8_aps']['name'],
reposet=REPOS['kickstart']['rhel8_aps']['reposet'],
Expand All @@ -316,25 +324,41 @@ def test_ccv_promote_registry_name_change(
repo = module_target_sat.api.Repository(id=rh_repo_id).read()
repo.sync(timeout=600)
cv = module_target_sat.api.ContentView(
<<<<<<< HEAD
organization=module_sca_manifest_org
=======
organization=module_entitlement_manifest_org
>>>>>>> 9c8e7f7a9 (CC Automation/Comp Eval coverage)
).create()
cv = module_target_sat.api.ContentView(id=cv.id, repository=[repo]).update(["repository"])
cv.publish()
cv = cv.read()
composite_cv = module_target_sat.api.ContentView(
<<<<<<< HEAD
organization=module_sca_manifest_org, composite=True
=======
organization=module_entitlement_manifest_org, composite=True
>>>>>>> 9c8e7f7a9 (CC Automation/Comp Eval coverage)
).create()
composite_cv.component = [cv.version[0]]
composite_cv = composite_cv.update(['component'])
composite_cv.publish()
composite_cv = composite_cv.read()
# Create LCEs with the specific registry value
lce1 = module_target_sat.api.LifecycleEnvironment(
<<<<<<< HEAD
organization=module_sca_manifest_org,
registry_name_pattern='<%= repository.name %>',
).create()
lce2 = module_target_sat.api.LifecycleEnvironment(
organization=module_sca_manifest_org,
=======
organization=module_entitlement_manifest_org,
registry_name_pattern='<%= repository.name %>',
).create()
lce2 = module_target_sat.api.LifecycleEnvironment(
organization=module_entitlement_manifest_org,
>>>>>>> 9c8e7f7a9 (CC Automation/Comp Eval coverage)
registry_name_pattern='<%= lifecycle_environment.label %>/<%= repository.name %>',
).create()
version = composite_cv.version[0].read()
Expand Down

0 comments on commit db5d817

Please sign in to comment.