Skip to content

Commit

Permalink
Adding test for overriding repos no select all
Browse files Browse the repository at this point in the history
  • Loading branch information
ColeHiggins2 committed Jan 3, 2024
1 parent 8d9af78 commit fcaa141
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion tests/foreman/ui/test_repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_positive_custom_products_disabled_by_default(


@pytest.mark.rhel_ver_match('[^6]')
def test_positive_override_custom_products_on_existing_host(
def test_positive_override_custom_products_using_select_all(
session,
default_location,
setup_content,
Expand Down Expand Up @@ -101,3 +101,49 @@ def test_positive_override_custom_products_on_existing_host(
repo = session.host_new.get_repo_sets(rhel_contenthost.hostname, custom_repo.name)
assert repo[0]['Repository'] == custom_repo.name
assert repo[0]['Status'] == 'Enabled'


@pytest.mark.rhel_ver_match('[^6]')
def test_positive_override_custom_products_not_using_select_all(
session,
default_location,
setup_content,
rhel_contenthost,
target_sat,
):
"""Verify that custom products can be easily enabled/disabled on existing host
by individually selecting the repositories from the table instead of the select all method
:id: 9d5c05fb-3683-40a2-91fd-a3aa526b25f4
:steps:
1. Create custom product and upload repository
2. Attach to activation key
3. Register Host
4. Assert that custom proudcts are disabled by default
5. Override custom products to enabled by selecting the repos individually and
using the new funtionality at the top
6. Assert custom products are now enabled
:expectedresults: Custom products should be easily enable NOT using the select all method
:BZ: 2256473
:parametrized: yes
"""
ak, org, custom_repo = setup_content
client = rhel_contenthost
client.register(org, default_location, ak.name, target_sat)
assert client.subscribed
with session:
session.organization.select(org.name)
session.location.select(default_location.name)
repo = session.host_new.get_repo_sets(rhel_contenthost.hostname, custom_repo.name)
assert repo[0]['Repository'] == custom_repo.name
assert repo[0]['Status'] == 'Disabled'
session.host_new.override_multiple_repo_sets(
rhel_contenthost.hostname, custom_repo.name,'Custom', "Override to enabled"
)
repo = session.host_new.get_repo_sets(rhel_contenthost.hostname, custom_repo.name)
assert repo[0]['Repository'] == custom_repo.name
assert repo[0]['Status'] == 'Enabled'

0 comments on commit fcaa141

Please sign in to comment.