Fix container tests in `run_tests.sh` use hard-coded `DV_VERSION`
Issue #224 addressed the problem of the local test runner using containers failing due to various reasons. The current implementation hard-coded DV_VERSION=6.3, which is not sustainable with newer versions. This PR addresses this issue specifically and also cleans up a couple of other processes in the test chain.
Testing workflow improvements:
- The
unit-testscontainer now waits for Dataverse to be ready before running tests, dynamically fetches the Dataverse version via its API, and sets theDV_VERSIONenvironment variable accordingly. The test startup script also installs required Python dependencies and provides more detailed output during test execution. - The
run-tests.shscript has been enhanced to provide clearer progress updates, improved error handling, and more informative output for both successful and failed test runs, including displaying pytest results or container logs as appropriate. [1] [2]
Configuration and environment updates:
- The
local-test.envfile now includes a defaultDV_VERSION, which is overridden by dynamic detection during tests.
Docker Compose file standardization:
- All string values in
docker/docker-compose-base.yml(such as container names, hostnames, ports, commands, and restart policies) have been updated to use single quotes for consistency and to avoid YAML parsing issues. [1] [2] [3] [4]
Please note, the test log in #224 provided several other failed tests, but I failed to reproduce these on my machine. Tests pass using the 6.7.1 version. @pdurbin these could be related to other issues we should investigate.
@pdurbin, the script now saves the Dataverse logs into a separate file. This might help pinpoint the exact issue causing the tests to fail.