Hacker News new | ask | show | jobs
by zelphirkalt 601 days ago
One thing Docker helps with is reproducibility. If you write your images properly (not many people do) then you can have exact same conditions for every time you run tests. If you keep databases on the host machine, instead of containers, you will have to have some cleanup steps and automate somehow, that they are always run. Otherwise you risk shaky test results or even false positives/negatives. That might be fine, if the CI runs the tests reliably as well though.
1 comments

> same conditions for every time you run tests

I can understand it is something desirable sometimes... but most of the time that is exactly what I do not want of a test! I want to have everything changing, so I can test under other conditions. Running same test, for the same code, under the same conditions more than once, is redundant