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

role should ignore while import #16873

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
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
Loading