yegor256 / netbout

Private talks made easy ... for robots
https://www.netbout.com/
MIT License
41 stars 35 forks source link

Testcontainers configuration for database bootstrapping #1190

Open h1alexbel opened 7 months ago

h1alexbel commented 7 months ago

When I pulled a code, first thing I did was

$ bundle exec rake

after small investigation, I found that I need to have a running PostgreSQL instance on my laptop.

Can we use docker and testcontainers here? Its much simpler and does not require any local instances directly on laptop. Testcontainer will handle that by running container you need (postgres 14 in this case), running integration tests and shutting down the container.

@yegor256 WDYT?

yegor256 commented 7 months ago

@h1alexbel you don't need to have a running instance. You just need PostgreSQL server to be installed on your laptop. Rake will start an instance of it and then, when all tests are finished, it will stop it.

It's a good idea about testcontainers, we can try it.

h1alexbel commented 7 months ago

@yegor256 can you assign me on this then?