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

fixes in rex infrahost tests #14874

Merged
merged 1 commit into from
Apr 26, 2024
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
18 changes: 14 additions & 4 deletions tests/foreman/cli/test_remoteexecution.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,25 +635,35 @@ class TestRexUsers:
"""Tests related to remote execution users"""

@pytest.fixture(scope='class')
def class_rexmanager_user(self, module_org, class_target_sat):
def class_rexmanager_user(self, module_org, default_location, class_target_sat):
"""Creates a user with Remote Execution Manager role"""
password = gen_string('alpha')
rexmanager = gen_string('alpha')
class_target_sat.cli_factory.user(
{'login': rexmanager, 'password': password, 'organization-ids': module_org.id}
{
'login': rexmanager,
'password': password,
'organization-ids': module_org.id,
'location-ids': default_location.id,
}
)
class_target_sat.cli.User.add_role(
{'login': rexmanager, 'role': 'Remote Execution Manager'}
)
return (rexmanager, password)

@pytest.fixture(scope='class')
def class_rexinfra_user(self, module_org, class_target_sat):
def class_rexinfra_user(self, module_org, default_location, class_target_sat):
"""Creates a user with all Remote Execution related permissions"""
password = gen_string('alpha')
rexinfra = gen_string('alpha')
class_target_sat.cli_factory.user(
{'login': rexinfra, 'password': password, 'organization-ids': module_org.id}
{
'login': rexinfra,
'password': password,
'organization-ids': module_org.id,
'location-ids': default_location.id,
}
)
role = class_target_sat.cli_factory.make_role({'organization-ids': module_org.id})
invocation_permissions = [
Expand Down
Loading