From af08623a75050f1002201ee62f15d78ddc386b25 Mon Sep 17 00:00:00 2001 From: Adarsh Dubey Date: Fri, 15 Dec 2023 21:29:12 +0530 Subject: [PATCH] mend --- pytest_fixtures/core/xdist.py | 6 +++--- tests/foreman/ui/test_registration.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pytest_fixtures/core/xdist.py b/pytest_fixtures/core/xdist.py index ac8f52ab663..4d02fe026d0 100644 --- a/pytest_fixtures/core/xdist.py +++ b/pytest_fixtures/core/xdist.py @@ -30,9 +30,9 @@ def align_to_satellite(request, worker_id, satellite_factory): worker_pos = int(worker_id.replace('gw', '')) # attempt to add potential satellites from the broker inventory file - # if settings.server.inventory_filter: - # hosts = Satellite.get_hosts_from_inventory(filter=settings.server.inventory_filter) - # settings.server.hostnames += [host.hostname for host in hosts] + if settings.server.inventory_filter: + hosts = Satellite.get_hosts_from_inventory(filter=settings.server.inventory_filter) + settings.server.hostnames += [host.hostname for host in hosts] # attempt to align a worker to a satellite if settings.server.xdist_behavior == 'run-on-one' and settings.server.hostnames: diff --git a/tests/foreman/ui/test_registration.py b/tests/foreman/ui/test_registration.py index 09c069a7313..a5689afc0c3 100644 --- a/tests/foreman/ui/test_registration.py +++ b/tests/foreman/ui/test_registration.py @@ -41,7 +41,7 @@ def test_positive_verify_default_values_for_global_registration( ak = module_target_sat.cli_factory.make_activation_key( {'organization-id': default_org.id, 'name': gen_string('alpha')} ) - with session: + with module_target_sat.ui_session() as session: session.organization.select(org_name=default_org.name) session.location.select(loc_name=default_location.name) cmd = session.host.get_register_command(