|
| 1 | +# A Topological Setup for Testing the Python Client |
| 2 | + |
| 3 | +The `docker-testing` directory contains the necessary files for building and |
| 4 | +running the client test suite from the perspective of a specific client node |
| 5 | +(separate from the iRODS server node it targets for the tests). |
| 6 | + |
| 7 | +The client, provider, and database are currently run on distinct nodes within |
| 8 | +a network topology set up by `docker compose` for the tests. |
| 9 | + |
| 10 | +We currently allow a choice of Python interpreter and iRODS server to be installed |
| 11 | +on the client and provider nodes, respectively. |
| 12 | + |
| 13 | +The choice of versions are dictated when running the test: |
| 14 | + |
| 15 | +| Environment Variable | Min supported version | Max supported version | |
| 16 | +| -------------------- | --------------------- | --------------------- | |
| 17 | +| IRODS_PACKAGE_VERSION | 4.3.1 | 5.0.2 | |
| 18 | +| PYTHON_VERSION | 3.9 | 3.13 | |
| 19 | + |
| 20 | +Currently the database server is fixed as Postgres. |
| 21 | + |
| 22 | +## Details of usage |
| 23 | + |
| 24 | +The file `.github/workflows/run-the-tests.yml` describes a Github action which |
| 25 | +will be started to run the client test suite in response to creating a pull |
| 26 | +request, or pushing new commits to the GitHub branch, containing it. |
| 27 | + |
| 28 | +The command-line recipe outlined in the file also supports running the |
| 29 | +test suite on any workstation with docker compose installed. |
| 30 | + |
| 31 | +A summary of how to run the tests "at the bench" follows: |
| 32 | + |
| 33 | + 1. Change the working directory to the root directory of the repository, e.g.: |
| 34 | + ``` |
| 35 | + cd /path/to/python-irodsclient |
| 36 | + ``` |
| 37 | +
|
| 38 | + 2. Run: |
| 39 | + ``` |
| 40 | + ./docker-testing/start_containers.sh 4.3.4 3.11 |
| 41 | + ``` |
| 42 | + This builds and runs the docker images for the project, with "4.3.4" being the iRODS |
| 43 | + version installed on the provider and "3.11" being the version of python installed on the client side. |
| 44 | +
|
| 45 | + 3. Run: |
| 46 | + ``` |
| 47 | + docker exec <client_container_name> /repo_root/docker-testing/run_tests.sh |
| 48 | + ``` |
| 49 | + (Note: `/repo_root` is an actual literal path, internal to the container.) |
| 50 | + You'll see the test output displayed on the console. At completion, xmlrunner outputs are in |
| 51 | + `/tmp/python-irodsclient/test-reports`. |
| 52 | +
|
| 53 | + 4. Tail docker logs to see the iRODS server log. |
| 54 | + ``` |
| 55 | + docker logs -f <provider_container_name> |
| 56 | + ``` |
0 commit comments