Adaguc contains two types of tests:
- Tests specifically for adaguc-server
- Tests specifically for the Python wrapper/EDR functionality
During the tests, adaguc makes use of a PostgreSQL backend.
To run the tests against Postgres, the following needs to happen:
- The adaguc XML configuration files used by tests all require a
<DataBase parameters="{ADAGUC_DB}"/>section. This gets handled bystarttests_psql.sh - PostgreSQL must be reachable on port
5432.
To do this through Docker, follow these steps:
- Edit
docker-compose.yml - Comment out all servers that are not
adaguc-db - Add the
portssection to theadaguc-dbservice to expose port 5432:
adaguc-db:
(...)
ports:
- 5432:5432- Start postgres while inside the
./Dockerdirectory:
docker compose up -d- Edit
./Dockerfile, to enable theruntests_psql.sh:
RUN bash runtests_psql.sh- Trigger a new build:
docker build -t adaguc-server --progress plain --add-host=host.docker.internal:host-gateway .All tests should now run against postgres via the docker build.
To run the tests outside of Docker, make sure Postgres is reachable on port 5432, and then execute the test script directly:
docker compose -f Docker/docker-compose-test.yml up -Vd
./runtests_psql.sh
⚠️ Note: some tests might fail due to platform architecture differences between amd64 and arm64.