Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Customer Case] Adding test for overriding repos no select all #13596

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 48 additions & 1 deletion tests/foreman/ui/test_repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,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 @@ -96,3 +96,50 @@ 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

:setup:
1. Create custom product and upload repository
2. Attach to activation key

:steps:
1. Register Host
2. Assert that custom proudcts are disabled by default
3. Override custom products to enabled by selecting the repos individually and
using the new funtionality at the top
4. 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
rhel_contenthost.register(org, default_location, ak.name, target_sat)
assert rhel_contenthost.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'
Loading