IntegreNet is a .NET client library for IntegreSQL which manages isolated PostgreSQL databases for your integration tests.
You can install via NuGet:
Install-Package IntegreNet
This can be done in multiple ways one of which is using a docker-compose
.
There's an example docker-compose.yml
file included in this repository. It is also used in this project's CI workflow (integration
step).
In essence it is done like this:
docker-compose -f ./.docker/docker-compose.yml run -v ${PWD}:/app --workdir /app sdk dotnet test --no-build --verbosity normal ./IntegreNet.Tests.Integration.dll
This will launch the provided Docker configuration and run the dotnet test
command on the provided dll
.
Since IntegreSQL is an easily runnable Docker image you might find other ways of running it your way.