Bug #22544
openRails config loader should not ignore database name given in config file, even in test mode
Description
This code effectively means the test suite fails if the test database name is anything other than arvados_test
:
# Special case for test database where there's no database.yml,
# because the Arvados config.yml doesn't have a concept of multiple
# rails environments.
#
if ::Rails.env.to_s == "test" && db_config["test"].nil?
$arvados_config["PostgreSQL"]["Connection"]["dbname"] = "arvados_test"
end
Since this code was written, run_test_server.py
(and install guides, etc.) moved database configs from {railsroot}/config/database.yml
to config.yml
, so the Rails config loader no longer needs to second-guess the database name, or even read database.yml
at all.
We should remove this unneeded code from the Rails config loader so it just does what config.yml
says to do.
Updated by Tom Clegg about 1 month ago
- Related to Bug #22406: lib/controller/localdb tests build arvados-server, run it in debian:11 container, assume too much glibc compatibility added
Updated by Brett Smith about 1 month ago
- Target version deleted (
Development 2025-02-12) - Assigned To deleted (
Tom Clegg)
Tom Clegg wrote:
We should remove this unneeded code from the Rails config loader so it just does what
config.yml
says to do.
This got done in b23567171b16e4d6718dd78ea57bb25bc4b06a76. It would be good to test that the rest of the stack works with a custom database name, but the biggest obstacle is out of the way now.