jarlah
Looking for feedback and/or contributors for testcontainers_elixir
Hi!
I have recently created, after having tried to get in touch with the creator of excontainers for quite some time, a new library called testcontainers_elixir, which I hope will be merged into the testcontainers family of repositories at some point. Im looking for any type of feedback and/or contributors. There is a lot of groundwork that needs to be done in the repository, so any help someone can give is precious.
It’s currently containing a very crude example of what I believe will be the core idea of the library. A macro function to create a container, that returns {:ok, container} if container was created successfully. No setup, no nothing. Just works. And it works wonderfully except for the fact I have just whipped up some code to get it working. A demo. A PoC.
I have added a project in the repo, and I have began thinking about how to get this working from top to bottom. Added some todos.
I want to solve the primary need, to create throw away testcontainers when running single tests. Shared containers and all that, I’m neglecting consciously.
I added this thread in testcontainers slack. So have some loose backing on that side.
What do you think ? Can you contribute ? Am I on the right track ? is GenServer really the best approach here for a reaper process ?
Thanks!
Most Liked
jarlah
Update!!
Published two packages to Hex today:
- ex_docker_engine_api | Hex (there is excontainers and docker_engine_api but both of these are useless as I need something stable to depend on)
- testcontainers | Hex
The latter being the interesting one ![]()
Im crossing fingers that some might find it useful! I have committed to this project, and I’m ready for all the weird corner cases.
Maybe you want to join in on the fun and improve on it? You are welcome! ![]()
jarlah
Update
Just released a new feature
You can now use testcontainers with MySql adapter for ecto too ![]()
The plan is to increase the number of supported databases for use with ecto.
Right now the plan is to add more containers, among them mongodb, including ecto support for it. And other commonly used databases with Phoenix.
jarlah
(Big?) Update
v1.2.3 is released.
It fixes a glaring issue about container cleanup, that caused parallell test runs to fail each other in random ways.
I needed to do some huge refactor of the library, internally, which didn’t added breaking changes in the api, luckily.
But for ExUnit and disposable containers inside the tests, you must now add
Testcontainers.start_link()
in test/test-helper.exs
This is not needed if using the Testcontainers.Ecto module, which can be dropped into application.ex as shown in the readme.
I considered making a minor version change, but this only fixes bugs and discrepancies.
Popular in RFCs
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








