testing of ptdb is done with docker compose. this file documents that testing prosedure.
on the first run the container needs to be built so run docker compose build; docker compose up --exit-code-from ptdb-test
. on subsequent runs you only need to run the command, docker compose up --exit-code-from ptdb-test
.
the docker compose files has multiple docker containers to simulate a whole netowrk. theres an attacker container that runs ptdb, a database container to store the generated data, and other miscellaneous containers to simulate a computer network. the attacker container simply runs a script that runs commadns and pushes teh retrieved data to the database; then it queries the database to check that the stored data is correct. this script is called: tests/test.sh
.