Skip to content

Repository files navigation

testcontainer_formulas

testcontainer_formulas

Hex PackageHex DocsCILicense

Ready-to-use formulas for testcontainer with typed outputs.

Each formula gives you sensible defaults plus a rich record (for example PostgresContainer with connection_url, host, port) so tests do not rebuild connection strings manually.

Install

gleam add testcontainer
gleam add testcontainer_formulas

Quick example

importtestcontainerimporttestcontainer_formulas/postgrespubfnuser_repository_test(){usepg<-testcontainer.with_formula(postgres.new()|>postgres.with_database("myapp_test")|>postgres.with_password("secret")|>postgres.formula(),)let_=pg.connection_urlOk(Nil)}

Available formulas

  • testcontainer_formulas/mongo
  • testcontainer_formulas/mysql
  • testcontainer_formulas/postgres
  • testcontainer_formulas/rabbitmq
  • testcontainer_formulas/redis

Documentation

License

MIT.

About

Ready-to-use formulas for testcontainer with typed outputs.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages