tank-postgres
Postgres driver implementation for Tank: the Rust data layer
Running Tests
Running the tests requires an instance of Postgre. You can provide the connection URL using the environment variable TANK_POSTGRES_TEST. If this variable is not set, a containerized Postgres instance will automatically be launched using testcontainers-modules.
- Make sure docker is running:
- Add your user to the Docker group (so you can run Docker without sudo):
You might need to log out and back in for this change to take effect.
[!CAUTION] When running tests using the Postgres instance from testcontainers, never stop or kill the test abruptly (e.g., while at a breakpoint), as the container may not be cleaned up properly. Repeatedly starting and killing tests can leave multiple Postgres containers running, quickly consuming system resources..
To inspect running containers:
To stop a specific container: