Skip to content

Commit

Permalink
Fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yetamsft committed Jan 24, 2024
1 parent 48f42c4 commit 42d1f89
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions assets/batch_score/components/driver/tests/e2e/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,11 @@ def pytest_configure():
)

# Prepare to copy components in fixtures below to a temporary file to not muddle dev environments
pytest.source_dir = os.getcwd()
pytest.copied_batch_score_component_filepath = os.path.join(
pytest.source_dir, "yamls", "components", "v2", f"{str(uuid.uuid4())}_batch_score_devops_copy.yml"
)
pytest.source_dir = os.path.join(os.getcwd(), "assets", "batch_score", "components", "driver")
tmp_dir = os.path.join(pytest.source_dir, "batch_score_temp")
os.makedirs(tmp_dir, exist_ok=True)

pytest.copied_batch_score_component_metadata_json_filepath = os.path.join(
pytest.source_dir, "driver", "src", "batch_score", METADATA_JSON_FILENAME
)
pytest.copied_batch_score_component_filepath = os.path.join(tmp_dir, f"spec_copy_{str(uuid.uuid4())}.yml")


def pytest_unconfigure():
Expand All @@ -123,7 +120,6 @@ def pytest_unconfigure():
# Delete copied component to not muddle dev environments
try:
os.remove(pytest.copied_batch_score_component_filepath)
os.remove(pytest.copied_batch_score_component_metadata_json_filepath)
except FileNotFoundError:
pass

Expand All @@ -134,7 +130,7 @@ def register_components(main_worker_lock, asset_version):
if not _is_main_worker(main_worker_lock):
return

_register_component("../llm/batch_score_llm.yml", asset_version)
_register_component("batch_score_llm", asset_version)


@pytest.fixture(scope="session")
Expand Down

0 comments on commit 42d1f89

Please sign in to comment.