1
0
Fork 0
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:
Rafael Mendonça França 2021-08-05 14:27:30 -04:00
parent d4d14a34a1
commit c91a8135c7
No known key found for this signature in database
GPG key ID: FC23B6D0F1EEE948
2 changed files with 7 additions and 1 deletions

View file

@ -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"

View file

@ -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: