Skip to content

Commit

Permalink
swapped out hammer execute for reposets method
Browse files Browse the repository at this point in the history
  • Loading branch information
ColeHiggins2 authored and sambible committed Oct 17, 2023
1 parent 73a5247 commit 91eb049
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tests/foreman/cli/test_repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,14 @@ def test_positive_disable_rh_repo_with_basearch(module_target_sat, module_entitl
)
repo = module_target_sat.api.Repository(id=rh_repo_id).read()
repo.sync(timeout=2000)
disabled_repo = module_target_sat.execute(
f'hammer repository-set disable --basearch {DEFAULT_ARCHITECTURE} '
f'--name "Red Hat Enterprise Linux 8 for x86_64 - BaseOS (Kickstart)" '
f'--product-id {repo.product.id} '
f'--organization-id {module_entitlement_manifest_org.id} '
f'--releasever 8 '
f'--repository-id {rh_repo_id}'
disabled_repo = module_target_sat.cli.RepositorySet.disable(
{
'basearch': DEFAULT_ARCHITECTURE,
'name': "Red Hat Enterprise Linux 8 for x86_64 - BaseOS (Kickstart)",
'product-id': repo.product.id,
'organization-id': module_entitlement_manifest_org.id,
'releasever': 8,
'repository-id': rh_repo_id,
}
)
assert 'Repository disabled' in disabled_repo.stdout
assert 'Repository disabled' in disabled_repo[0]['message']

0 comments on commit 91eb049

Please sign in to comment.