View Source Testcontainers.ExUnit (testcontainers v1.0.0-beta)

Convenient macros to run containers within ExUnit tests.

Summary

Functions

Sets a container to be created anew for each test in the module.

Runs a container for a single ExUnit test.

Sets a container to be created at the beginning of the test module, and shared among all the tests.

Functions

Link to this macro

container(name, config)

View Source (macro)

Sets a container to be created anew for each test in the module.

It also sets up the ExUnit callback to remove the container after the test has finished.

Runs a container for a single ExUnit test.

It also sets up the ExUnit callback to remove the container after the test finishes.

Link to this macro

shared_container(name, config)

View Source (macro)

Sets a container to be created at the beginning of the test module, and shared among all the tests.

It also sets up the ExUnit callback to remove the container after all the test in the module have finished.