testcontainers / testcontainers-elixir

Testcontainers is an Elixir library that supports ExUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve documentation in README

jarlah opened this issue · comments

I need to document a more basic api usage, instead of documenting the use of high level ecto or exunit functions.

For ex

{:ok, _} = Testcontainers.start_link()
config = Testcontainers.Container.RedisContainer.new()
{:ok, container} = Testcontainers.start_container(config)

Or

setup 
  config = Testcontainers.Container.RedisContainer.new()
  {:ok, container} = Testcontainers.start_container(config)
  ExUnit.Callbacks.on_exit(fn -> Testcontainers.stop_container(container.container_id) end)
  {:ok, %{redis: container}}
end