- 3 Postgres instances, to emulate a distributed production-like setup
- Each Postgres instance has all the Nile extensions installed
- All functionalities documented in our docs work with the image
- At this point, the UI console is not included in the image
Using Nile’s docker container with TestContainers
A common way to automate integration tests is using TestContainers.Node.js
The following example shows how to use Nile’s docker container with Node.js and the TestContainers library. It exposes a Postgres port and useswaitForLog
strategy to wait until the container is ready. Then it connects to the database and runs a simple query.
Make sure you install testcontainers
and pg
npm packages:
- You can get the containter logs while tests are running by running
export DEBUG=testcontainers*
before running the tests.
Python
Make sure you installtestcontainers
and psycopg2
python packages:
- On MacOS, you may need to explicitly set the
DOCKER_HOST
environment variable: