evainga / rememberbrall

A tiny little programme which helps to remember interesting stuff.
2 stars 1 forks source link

Integration tests write entries into live-db #16

Closed evainga closed 6 years ago

evainga commented 6 years ago

Ever since mvn clean verify has been made obligatory for a deployment in heroku, with each deployment two Entry items ("LINUX Waschmittel") are written into the live db. This shouldn't happen. Either the item must be deleted again after creation - or there is a possibility to use another db during the deployment verify process.

evainga commented 6 years ago

Idea: Production and Staging system on heroku and using an embedded Mongo for staging (and local testing): https://springframework.guru/spring-data-mongodb-with-reactive-mongodb/ then only do tests on staging and copy the created jar to production

evainga commented 6 years ago

This issue was finally fixed with commit bc8aecb1af226e8bc023cf01646ec73a6225990c and can be closed.

Even though it gave me a lot of headache, the solution was very simple. Adding flapdoodle to the projects test scope already did the trick - no more configuration was needed. From now on tests are running on an embedded mongo and the production system has its very own mongo with real entries. No more LINUX Waschmittel entries on production-db! see: https://rememberbrall.herokuapp.com/thymeleaf-entries