|
| 1 | +# A Topological Setup for Testing the Python Client |
| 2 | + |
| 3 | +The `docker-testing` directory contains the necessary files for building and |
| 4 | +running tests from the perspective of a specific client node in a larger network. |
| 5 | + |
| 6 | +We currently allow a choice of Python interpreter and iRODS server to be installed |
| 7 | +on the client and provider nodes of a simulated network topology. |
| 8 | + |
| 9 | +The choice of versions are dictated when running the test: |
| 10 | + |
| 11 | +|:------------------:|:---------------:| |
| 12 | +|Environment Variable| Valid Range | |
| 13 | +|:-------------------|-----------------| |
| 14 | +IRODS_PACKAGE_VERSION|4.3.1 to 5.0.2 | |
| 15 | +PYTHON_VERSION |3.9 to 3.13 | |
| 16 | +|:-------------------|-----------------| |
| 17 | + |
| 18 | +Currently the database server is fixed as Postgres. |
| 19 | + |
| 20 | +## Details of usage |
| 21 | + |
| 22 | +The file `$REPO/.github/workflows/run-the-tests.yml` |
| 23 | +(where `$REPO` is the `/path/to/local/python-irodsclient` repository) |
| 24 | +contains commands for starting the server and client containers and running the PRC |
| 25 | +suite in response to a push or pull-request. |
| 26 | + |
| 27 | +The test suite can also be run on any workstation with docker compose installed. |
| 28 | +What follows is a short summary of how to run the test configuration at the bench. |
| 29 | +It is this procedure which is run within the Github workflows. |
| 30 | + |
| 31 | + 1. cd into top level of $REPO |
| 32 | + |
| 33 | + 2. run: |
| 34 | + ``` |
| 35 | + ./docker-testing/start_containers.sh 4.3.4 3.11 |
| 36 | + ``` |
| 37 | + This builds and runs the docker images for the project, with "4.3.4" being the iRODS |
| 38 | + version installed on the provider and "3.11" is the version of python run on the client side. |
| 39 | +
|
| 40 | + 3. run: |
| 41 | + ``` |
| 42 | + docker exec <name-of-python-client-container> /repo_root/docker-testing/run_tests.sh |
| 43 | + ``` |
| 44 | + (Note: `/repo_root` is an actual literal path, internal to the container.) |
| 45 | + You'll see the test output displayed on the console. At completion, xmlrunner outputs are in /tmp. |
| 46 | +
|
| 47 | + 4. use `docker logs -f` with the provider instance name to tail the irods server log output |
0 commit comments