Skip to content

Latest commit

 

History

History

docker

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

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.