[ARVADOS] updated: 1.3.0-735-g0e5e80d05
Git user
git at public.curoverse.com
Thu Apr 11 14:00:44 UTC 2019
Summary of changes:
services/api/config/arvados_config.rb | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
via 0e5e80d054cc19c145f5bc02dfc3bd6271fde316 (commit)
from 1346cc5072843797a8091cd67a0eb75499a97642 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 0e5e80d054cc19c145f5bc02dfc3bd6271fde316
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date: Thu Apr 11 10:00:26 2019 -0400
13996: Don't override name of test db if one was provided in database.yml
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
diff --git a/services/api/config/arvados_config.rb b/services/api/config/arvados_config.rb
index a9733bc7a..f0eb55a8f 100644
--- a/services/api/config/arvados_config.rb
+++ b/services/api/config/arvados_config.rb
@@ -175,12 +175,11 @@ end
db_config = {}
path = "#{::Rails.root.to_s}/config/database.yml"
if File.exist? path
- confs = ConfigLoader.load(path)
- db_config.deep_merge!(confs[::Rails.env.to_s] || {})
+ db_config = ConfigLoader.load(path)
end
$remaining_config = arvcfg.migrate_config(application_config, $arvados_config)
-dbcfg.migrate_config(db_config, $arvados_config)
+dbcfg.migrate_config(db_config[::Rails.env.to_s] || {}, $arvados_config)
if application_config[:auto_activate_users_from]
application_config[:auto_activate_users_from].each do |cluster|
@@ -196,10 +195,11 @@ arvcfg.coercion_and_check $arvados_config
dbcfg.coercion_and_check $arvados_config
#
-# Special case for test database, because the Arvados config.yml
-# doesn't have a concept of multiple rails environments.
+# 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"
+if ::Rails.env.to_s == "test" && db_config["test"].nil?
$arvados_config["PostgreSQL"]["Connection"]["DBName"] = "arvados_test"
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list