Skip to content

Latest commit

 

History

History
9 lines (6 loc) · 564 Bytes

README.md

File metadata and controls

9 lines (6 loc) · 564 Bytes

cargo-fixture docker example

The fixture uses the dockertest library. It launches a postgres docker container and creates a table in the DB. The DB connection URI is shared in the POSTGRES_URI environment variable. No that the container preparation may take some time upon first run as the image is pulled in the process.

The test code reads the variable and connects to the DB.

Back in the fixture after the tests are run, the dockertest the docker container is stopped and removed.