Skip to content

Commit

Permalink
[tests/scenario] fix small bug
Browse files Browse the repository at this point in the history
[tox] add `ORCHESTRA_DEPLOYMENT_TYPE` for scenario python tests
  • Loading branch information
khoaguin committed Oct 1, 2024
1 parent 23ac669 commit f243637
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/scenariosv2/l2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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]
Expand Down

0 comments on commit f243637

Please sign in to comment.