From ae82578ae0805ab0691534cdbbde1087bdaa03df Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 10 Aug 2022 14:23:16 -0400 Subject: [PATCH] BB: Rename list_machines -> gcp_machines_to_start --- envs/monkey_zoo/blackbox/conftest.py | 2 +- envs/monkey_zoo/blackbox/test_blackbox.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/envs/monkey_zoo/blackbox/conftest.py b/envs/monkey_zoo/blackbox/conftest.py index ec8852abd..3553f9edc 100644 --- a/envs/monkey_zoo/blackbox/conftest.py +++ b/envs/monkey_zoo/blackbox/conftest.py @@ -37,7 +37,7 @@ def no_gcp(request): @pytest.fixture(scope="session") -def list_machines(request: pytest.FixtureRequest) -> Mapping[str, Collection[str]]: +def gcp_machines_to_start(request: pytest.FixtureRequest) -> Mapping[str, Collection[str]]: machines_to_start: Dict[str, Set[str]] = {} enabled_tests = (test.name for test in request.node.items) diff --git a/envs/monkey_zoo/blackbox/test_blackbox.py b/envs/monkey_zoo/blackbox/test_blackbox.py index 52e9e10dd..16ee4c0be 100644 --- a/envs/monkey_zoo/blackbox/test_blackbox.py +++ b/envs/monkey_zoo/blackbox/test_blackbox.py @@ -34,20 +34,20 @@ LOGGER = logging.getLogger(__name__) @pytest.fixture(autouse=True, scope="session") -def GCPHandler(request, no_gcp, list_machines): +def GCPHandler(request, no_gcp, gcp_machines_to_start): if not no_gcp: - LOGGER.info(f"MACHINES TO START: {list_machines}") + LOGGER.info(f"MACHINES TO START: {gcp_machines_to_start}") try: initialize_gcp_client() - start_machines(list_machines) + start_machines(gcp_machines_to_start) except Exception as e: LOGGER.error("GCP Handler failed to initialize: %s." % e) pytest.exit("Encountered an error while starting GCP machines. Stopping the tests.") wait_machine_bootup() def fin(): - stop_machines(list_machines) + stop_machines(gcp_machines_to_start) request.addfinalizer(fin)