Skip to content

Commit

Permalink
Add permission tests for foreman_scc_manager
Browse files Browse the repository at this point in the history
  • Loading branch information
dosas committed Nov 11, 2024
1 parent bf0e8c2 commit f9ea23c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions robottelo/constants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,19 @@
'lock_report_templates',
],
'Role': ['view_roles', 'create_roles', 'edit_roles', 'destroy_roles'],
'SccAccount': [
"delete_scc_accounts",
"edit_scc_accounts",
"new_scc_accounts",
"sync_scc_accounts",
"test_connection_scc_accounts",
"use_scc_accounts",
"view_scc_accounts",
],
'SccProduct': [
"subscribe_scc_products",
"view_scc_products",
],
'Setting': ['view_settings', 'edit_settings'],
'SmartProxy': [
'view_smart_proxies',
Expand Down
3 changes: 3 additions & 0 deletions tests/foreman/api/test_permission.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ def create_permissions(self, class_target_sat):
cls.permissions.pop('ForemanPuppet::HostClass')
cls.permissions.pop('ForemanPuppet::Puppetclass')
cls.permissions.pop('ForemanPuppet::PuppetclassLookupKey')
if 'rubygem-foreman_scc_manager' not in rpm_packages:
cls.permissions.pop('SccAccount')
cls.permissions.pop('SccProduct')

#: e.g. ['Architecture', 'Audit', 'AuthSourceLdap', …]
cls.permission_resource_types = list(cls.permissions.keys())
Expand Down

0 comments on commit f9ea23c

Please sign in to comment.