From f243637afa72210a97e470f21317a68637a1ddf3 Mon Sep 17 00:00:00 2001 From: dk Date: Tue, 1 Oct 2024 09:42:17 +0700 Subject: [PATCH] [tests/scenario] fix small bug [tox] add `ORCHESTRA_DEPLOYMENT_TYPE` for scenario python tests --- tests/scenariosv2/l2_test.py | 4 ++-- tox.ini | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/scenariosv2/l2_test.py b/tests/scenariosv2/l2_test.py index 20937eb30c3..1d713249a57 100644 --- a/tests/scenariosv2/l2_test.py +++ b/tests/scenariosv2/l2_test.py @@ -123,10 +123,10 @@ async def sim_l2_scenario(ctx: SimulatorContext): ] server_url = "http://localhost:8080" - deployment_type = os.environ.get("ORCHESTRA_DEPLOYMENT_TYPE", DeploymentType.PYTHON) + deployment_type = os.environ.get("ORCHESTRA_DEPLOYMENT_TYPE", DeploymentType.REMOTE) ctx.logger.info(f"Deployment type: {deployment_type}") if deployment_type == DeploymentType.PYTHON: - server = launch_server(ctx, server_url, "syft-high") + server = launch_server(server_url, "syft-high") admin_auth = { "url": server_url, diff --git a/tox.ini b/tox.ini index f9f8636116f..1ca9a26fb82 100644 --- a/tox.ini +++ b/tox.ini @@ -297,6 +297,8 @@ commands = [testenv:syft.test.scenario] description = BigQuery Scenario Tests on Python Servers (L2) changedir = {toxinidir} +setenv = + ORCHESTRA_DEPLOYMENT_TYPE = {env:ORCHESTRA_DEPLOYMENT_TYPE:python} deps = {[testenv:syft]deps} pytest-asyncio @@ -307,11 +309,14 @@ allowlist_externals = bash pytest commands = + bash -c "echo Running L2 BigQuery Scenario Tests with ORCHESTRA_DEPLOYMENT_TYPE=$ORCHESTRA_DEPLOYMENT_TYPE" bash -c "pytest -s --disable-warnings tests/scenariosv2/l2_test.py" [testenv:syft.test.scenario.sync] description = BigQuery Scenario Tests on Python Servers (L0) changedir = {toxinidir} +setenv = + ORCHESTRA_DEPLOYMENT_TYPE = {env:ORCHESTRA_DEPLOYMENT_TYPE:python} deps = {[testenv:syft]deps} pytest-asyncio @@ -322,6 +327,7 @@ allowlist_externals = bash pytest commands = + bash -c "echo Running L0 BigQuery Scenario Tests with ORCHESTRA_DEPLOYMENT_TYPE=$ORCHESTRA_DEPLOYMENT_TYPE" bash -c "pytest -s --disable-warnings tests/scenariosv2/l0_test.py" [testenv:stack.test.scenario.k8s]