From 0d2a6eaacbdce10035ae5ab9e82fb6a636a74008 Mon Sep 17 00:00:00 2001 From: Max Wang Date: Sat, 22 Jun 2024 08:09:45 -0400 Subject: [PATCH] Fix install during setup --- Dockerfile | 2 +- compose.yml | 17 +++++++++++++++++ setup.py | 2 +- test_harness/run.py | 2 +- test_harness/runner/__init__.py | 0 .../runner/{runner.py => query_runner.py} | 4 ++-- 6 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 compose.yml create mode 100644 test_harness/runner/__init__.py rename test_harness/runner/{runner.py => query_runner.py} (98%) diff --git a/Dockerfile b/Dockerfile index c307a5a..bd31f32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ COPY . . # make sure all is writeable for the nru USER later on RUN chmod -R 777 . -RUN pip install . +RUN pip install -e . # switch to the non-root user (nru). defined in the base image USER nru diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..3b4fa66 --- /dev/null +++ b/compose.yml @@ -0,0 +1,17 @@ +version: '3.7' + +services: + harness: + image: test-harness + container_name: test-harness + build: + context: . + volumes: + - ./logs:/app/logs + command: test-harness download sprint_4_tests + environment: + SLACK_WEBHOOK_URL: ${SLACK_WEBHOOK_URL} + SLACK_TOKEN: ${SLACK_TOKEN} + SLACK_CHANNEL: ${SLACK_CHANNEL} + ZE_BASE_URL: ${ZE_BASE_URL} + ZE_REFRESH_TOKEN: ${ZE_REFRESH_TOKEN} diff --git a/setup.py b/setup.py index 5812523..3bbd4f3 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="sri-test-harness", - version="0.2.0", + version="0.2.1", author="Max Wang", author_email="max@covar.com", url="https://github.com/TranslatorSRI/TestHarness", diff --git a/test_harness/run.py b/test_harness/run.py index d59531b..f5ba62a 100644 --- a/test_harness/run.py +++ b/test_harness/run.py @@ -13,7 +13,7 @@ from translator_testing_model.datamodel.pydanticmodel import TestCase -from test_harness.runner.runner import QueryRunner +from test_harness.runner.query_runner import QueryRunner from test_harness.reporter import Reporter from test_harness.slacker import Slacker from test_harness.result_collector import ResultCollector diff --git a/test_harness/runner/__init__.py b/test_harness/runner/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test_harness/runner/runner.py b/test_harness/runner/query_runner.py similarity index 98% rename from test_harness/runner/runner.py rename to test_harness/runner/query_runner.py index 3af542e..578810c 100644 --- a/test_harness/runner/runner.py +++ b/test_harness/runner/query_runner.py @@ -145,8 +145,8 @@ async def get_ars_responses( } async with httpx.AsyncClient(timeout=30) as client: # retain this response for testing - # res = await client.post(f"{base_url}/ars/api/retain/{parent_pk}") - # res.raise_for_status() + res = await client.post(f"{base_url}/ars/api/retain/{parent_pk}") + res.raise_for_status() # Get all children queries res = await client.get(f"{base_url}/ars/api/messages/{parent_pk}?trace=y") res.raise_for_status()