Skip to content

Commit

Permalink
fixes in rex infrahost tests (SatelliteQE#14874)
Browse files Browse the repository at this point in the history
  • Loading branch information
pondrejk authored and jyejare committed Oct 19, 2024
1 parent 658e143 commit a41c2a7
Showing 1 changed file with 14 additions and 4 deletions.
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

0 comments on commit a41c2a7

Please sign in to comment.