Project

General

Profile

Actions

Bug #22544

open

Rails config loader should not ignore database name given in config file, even in test mode

Added by Tom Clegg 6 days ago.

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.


Related issues 1 (1 open0 closed)

Related to Arvados - Bug #22406: lib/controller/localdb tests build arvados-server, run it in debian:11 container, assume too much glibc compatibilityIn ProgressBrett Smith02/05/2025Actions
Actions #1

Updated by Tom Clegg 6 days ago

  • Related to Bug #22406: lib/controller/localdb tests build arvados-server, run it in debian:11 container, assume too much glibc compatibility added
Actions

Also available in: Atom PDF