[openstreetmap/openstreetmap-website] WIP: Convert database config to support reading from replicas (#2563)

Andy Allan notifications at github.com
Wed Apr 8 15:18:13 UTC 2020


> If anyone has any suggestions on the first topic, I'm all ears

OK, I think I know how to make these show situations up in the tests. First, we need to enable the database_selector middleware in the test environment (and we might as well do so for development, too). 

However, the `controller` tests bypass the middleware entirely (partly why controller tests are deprecated - in many ways they don't really reflect an actual response). So only system tests are effective at picking up this problem, since they run the middleware.

Converting `controller` tests to `system` tests would be welcome, but it's a giant project! I'm not sure what to do in the meantime. Given the advantages of having reads-from-replicas enabled, it's worth taking the risk and fixing bugs if and when they come up?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2563#issuecomment-611019746
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200408/2ff06da3/attachment.htm>


More information about the rails-dev mailing list