mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Allow using a different socket to test mysql
This commit is contained in:
parent
d4d14a34a1
commit
c91a8135c7
2 changed files with 7 additions and 1 deletions
|
@ -197,7 +197,7 @@ namespace :db do
|
|||
namespace :mysql do
|
||||
connection_arguments = lambda do |connection_name|
|
||||
config = ARTest.config["connections"]["mysql2"][connection_name]
|
||||
["--user=#{config["username"]}", "--password=#{config["password"]}", ("--host=#{config["host"]}" if config["host"])].join(" ")
|
||||
["--user=#{config["username"]}", "--password=#{config["password"]}", ("--host=#{config["host"]}" if config["host"]), ("--socket=#{config["socket"]}" if config["socket"])].join(" ")
|
||||
end
|
||||
|
||||
desc "Build the MySQL test databases"
|
||||
|
|
|
@ -45,6 +45,9 @@ connections:
|
|||
<% end %>
|
||||
<% if ENV['MYSQL_HOST'] %>
|
||||
host: <%= ENV['MYSQL_HOST'] %>
|
||||
<% end %>
|
||||
<% if ENV['MYSQL_SOCK'] %>
|
||||
socket: "<%= ENV['MYSQL_SOCK'] %>"
|
||||
<% end %>
|
||||
arunit2:
|
||||
username: rails
|
||||
|
@ -56,6 +59,9 @@ connections:
|
|||
<% if ENV['MYSQL_HOST'] %>
|
||||
host: <%= ENV['MYSQL_HOST'] %>
|
||||
<% end %>
|
||||
<% if ENV['MYSQL_SOCK'] %>
|
||||
socket: "<%= ENV['MYSQL_SOCK'] %>"
|
||||
<% end %>
|
||||
|
||||
oracle:
|
||||
arunit:
|
||||
|
|
Loading…
Reference in a new issue