[openstreetmap/openstreetmap-website] "We could not find your database: osm_test" error when trying to run tests in docker (Issue #3947)

Andy Allan notifications at github.com
Sun Feb 26 10:05:13 UTC 2023


The immediate cause here is that the Docker instructions don't match what happens in CI, so we haven't noticed that the written instructions are incorrect.

In https://github.com/openstreetmap/openstreetmap-website/pull/3200 we removed our custom "rake test" task, which haddepended on (and therefore caused to run) the database preparation step. In that PR I updated the docker workflow for CI, but I didn't add the `db:test:prepare` statement to the DOCKER.md instructions. Mea culpa.

In the main (non-Docker) installation instructions, we don't use `bundle exec rails db:test:prepare` at all, and instead we use `bundle exec rails db:create` instead (which creates all three databases). There's an opportunity here to fix that inconsistency, so I would propose:

* Add `bundle exec rails db:create` to DOCKER.md
* Change docker.yml workflow to use `bundle exec rails db:create` instead of `... db:test:prepare`, for consistency.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3947#issuecomment-1445315015
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/3947/1445315015 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230226/8753f3fc/attachment.htm>


More information about the rails-dev mailing list