Actions
Bug #22544
openRails config loader should not ignore database name given in config file, even in test mode
Status:
New
Priority:
Normal
Assigned To:
-
Category:
API
Target version:
-
Story points:
-
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.
Actions