aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/config.example.yml
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2019-02-06 01:20:06 +1030
committerMatthew Draper <matthew@trebex.net>2019-02-06 01:20:06 +1030
commit287920ca7d06c8f51198ec750d65ba703835b257 (patch)
treefa38811f965fa873d02bc7df3317583ada076ff1 /activerecord/test/config.example.yml
parent44232b485485634d681c60868c619323f882e59f (diff)
downloadrails-287920ca7d06c8f51198ec750d65ba703835b257.tar.gz
rails-287920ca7d06c8f51198ec750d65ba703835b257.tar.bz2
rails-287920ca7d06c8f51198ec750d65ba703835b257.zip
Respect ENV variables when finding DBs etc for the test suite
If they're not set we'll still fall back to localhost, but this makes it possible to run the tests against a remote Postgres / Redis / whatever.
Diffstat (limited to 'activerecord/test/config.example.yml')
-rw-r--r--activerecord/test/config.example.yml6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/config.example.yml b/activerecord/test/config.example.yml
index 33962f9e5e..f5e3ac3c19 100644
--- a/activerecord/test/config.example.yml
+++ b/activerecord/test/config.example.yml
@@ -54,10 +54,16 @@ connections:
username: rails
encoding: utf8mb4
collation: utf8mb4_unicode_ci
+<% if ENV['MYSQL_HOST'] %>
+ host: <%= ENV['MYSQL_HOST'] %>
+<% end %>
arunit2:
username: rails
encoding: utf8mb4
collation: utf8mb4_general_ci
+<% if ENV['MYSQL_HOST'] %>
+ host: <%= ENV['MYSQL_HOST'] %>
+<% end %>
oracle:
arunit: