darkua / json_delta

a service that tracks json model changes and lists them
0 stars 0 forks source link

Different databases per environment #4

Open claudiaalves opened 7 years ago

claudiaalves commented 7 years ago

Imagine that for some reason you team decide to have different databases per environment. For example, memory db for tests mode and postgres for dev, staging and production. How would you improve your solution to be better prepared for this change? What would be your approach?

darkua commented 7 years ago

Yes i can imagine the scenario, but the question is why should you use different storages for testing purposes? If we are talking about unit tests, mock the requests to storage so no service dependency, if we are talking about integration tests, then make sure the continuous integration process has no architectural diferences in between all environments, or more work will be required without ensuring a real test use. And thanks god we have docker now, so no more "does not works in yours? well it works in mine" :)

On 2 February 2017 at 15:00, Cláudia Alves notifications@github.com wrote:

Imagine that for some reason you team decide to have different databases per environment. For example, memory db for tests mode and postgres for dev, staging and production. How would you improve your solution to be better prepared for this change? What would be your approach?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/darkua/json_delta/issues/4, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEeLNRl5UDl-exeJF7-YMA8iWqNL_pJks5rYe-kgaJpZM4L1Npc .

-- Sergio V.

Have a nice day!

"When not looking, waves of possibility, when looking, particles of experience." Quantum physics