diff --git a/.github/workflows/run-the-tests.yml b/.github/workflows/run-the-tests.yml index d68add98..080a9557 100644 --- a/.github/workflows/run-the-tests.yml +++ b/.github/workflows/run-the-tests.yml @@ -21,12 +21,12 @@ jobs: uses: actions/checkout@v4 - name: Start containers - run: ./start_containers.sh + run: ./start_containers.sh "${{ matrix.python }}" - name: run test run: | client_container=$(docker ps --format "{{.Names}}"|grep python.client) - docker exec -it "$(client_container)" /repo/docker-testing/run_tests.sh + docker exec -it "$(client_container)" /repo_root/docker-testing/run_tests.sh - name: Stop containers if: always() diff --git a/docker-testing/harness-docker-compose.yml b/docker-testing/harness-docker-compose.yml index f82cc5ed..bfeae7de 100644 --- a/docker-testing/harness-docker-compose.yml +++ b/docker-testing/harness-docker-compose.yml @@ -14,13 +14,12 @@ services: python-client: args: - python_version - - repo_external build: context: python_client command: tail -f /dev/null volumes: - ${repo_external}:/repo:ro + ${repo_external}:/repo_root:ro irods-catalog-provider: build: diff --git a/docker-testing/irods_catalog_provider/Dockerfile b/docker-testing/irods_catalog_provider/Dockerfile index a18ccbf9..2a574169 100644 --- a/docker-testing/irods_catalog_provider/Dockerfile +++ b/docker-testing/irods_catalog_provider/Dockerfile @@ -25,6 +25,7 @@ RUN apt-get update && \ python3-requests \ rsyslog \ unixodbc \ + gawk \ && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* diff --git a/docker-testing/python_client/Dockerfile b/docker-testing/python_client/Dockerfile new file mode 100644 index 00000000..ca8559b6 --- /dev/null +++ b/docker-testing/python_client/Dockerfile @@ -0,0 +1,2 @@ +ARG python_version +FROM python:${python_version} diff --git a/docker-testing/repo b/docker-testing/repo new file mode 120000 index 00000000..a96aa0ea --- /dev/null +++ b/docker-testing/repo @@ -0,0 +1 @@ +.. \ No newline at end of file diff --git a/docker-testing/run_tests.sh b/docker-testing/run_tests.sh index e13316b6..b149bccb 100755 --- a/docker-testing/run_tests.sh +++ b/docker-testing/run_tests.sh @@ -5,5 +5,10 @@ cd "$DIR" ./recv_oneshot -h irods-provider -p 8888 -t 360 REPO="$(realpath ./repo)" python -m pip install "$REPO[tests]" -./iinit.py host irods-provider port 1247 user rods password rods zone tempZone -python $REPO/irods/test/runner.py +./iinit.py \ + host irods-provider \ + port 1247 \ + user rods \ + password rods \ + zone tempZone +python "$REPO"/irods/test/runner.py diff --git a/docker-testing/start_containers.sh b/docker-testing/start_containers.sh index c90d2c10..f4ceef74 100755 --- a/docker-testing/start_containers.sh +++ b/docker-testing/start_containers.sh @@ -2,5 +2,5 @@ DIR=$(dirname "$0") cd "${DIR}" echo "python_version=${1}" >.env -echo "repo_external=$(realpath "${DIR}/repo")" >>.env -docker-compose -f harness-docker-compose.yml up -d +echo "repo_external=$(realpath ./repo)" >>.env +docker-compose -f harness-docker-compose.yml up -d --build