Commit 2ef7c83a authored by Mark Chao's avatar Mark Chao

Use merge instead of dup

parent 072224a7
...@@ -106,9 +106,9 @@ module Gitlab ...@@ -106,9 +106,9 @@ module Gitlab
end end
def elasticsearch_config(target) def elasticsearch_config(target)
config = Gitlab::CurrentSettings.elasticsearch_config.dup Gitlab::CurrentSettings.elasticsearch_config.merge(
config[:index_name] = target.index_name index_name: target.index_name
config.to_json ).to_json
end end
def gitaly_connection_info def gitaly_connection_info
......
...@@ -282,8 +282,7 @@ describe Gitlab::Elastic::Indexer do ...@@ -282,8 +282,7 @@ describe Gitlab::Elastic::Indexer do
end end
def elasticsearch_config def elasticsearch_config
config = Gitlab::CurrentSettings.elasticsearch_config.dup Gitlab::CurrentSettings.elasticsearch_config.merge(
config.merge!(
index_name: 'gitlab-test' index_name: 'gitlab-test'
) )
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment