Skip to content

Commit

Permalink
[6.16.z] role should ignore while import (#16877)
Browse files Browse the repository at this point in the history
  • Loading branch information
Satellite-QE authored Nov 6, 2024
1 parent 66b037f commit 99082ca
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 @@ -229,9 +229,9 @@ def _finalize():
(v['Name'], v['Ansible role'], v['Type'], v['Value']) for v in variable_table
]

@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 @@ -241,9 +241,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 99082ca

Please sign in to comment.