Skip to content

Commit

Permalink
role should ignore while import
Browse files Browse the repository at this point in the history
  • Loading branch information
amolpati30 committed Nov 7, 2024
1 parent 67029c3 commit f17b4a4
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions tests/foreman/ui/test_ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ def test_positive_ansible_variables_imported_with_roles(self):
:CaseAutomation: NotAutomated
"""

@pytest.mark.stubbed
@pytest.mark.tier3
def test_positive_ansible_roles_ignore_list(self):
@pytest.mark.parametrize('setting_update', ['ansible_roles_to_ignore'], indirect=True)
def test_positive_ansible_roles_ignore_list(self, target_sat, setting_update):
"""Verify that the ignore list setting prevents selected roles from being available for import
:id: 6fa1d8f0-b583-4a07-88eb-c9ae7fcd0219
Expand All @@ -279,9 +279,16 @@ def test_positive_ansible_roles_ignore_list(self):
2. Navigate to Configure > Roles
:expectedresults: Verify that any roles on the ignore list are not available for import
:CaseAutomation: NotAutomated
"""
SELECTED_ROLE = ['RedHatInsights.insights-client', 'redhat.satellite.activation_keys']
setting_update.value = SELECTED_ROLE
setting_update.update({'value'})
assert setting_update.value == SELECTED_ROLE
with target_sat.ui_session() as session:
roles = session.ansibleroles.read_all()
assert all(
item not in roles for item in SELECTED_ROLE
), 'Roles from ignore list are available for import'

@pytest.mark.stubbed
@pytest.mark.tier3
Expand Down

0 comments on commit f17b4a4

Please sign in to comment.