Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.01 KB

README.md

File metadata and controls

30 lines (24 loc) · 1.01 KB

ct_containers

A simplified erlang port of testcontainers.

Usage

ct_containers can either be used as a common test hook or by manually starting containers in test fixtures.

ct_hook:

suite() ->
    [{timetrap, {minutes, 5}},
     {ct_hooks,
      [{ct_containers_hook,
        [#{lifecycle_per => suite,
           containers =>
               [#{name => httpbin,
                  image => "kennethreitz/httpbin:latest",
                  options =>
                      [{ports, [{80, tcp}]},
                       {wait_strategy,
                        ct_containers_wait:regex(".*Listening at*.")},
                       {timeout, 60000},
                       {network, {some_network, "some_alias"}}]}]}]}]}].