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

Use merge instead of dup

parent 072224a7
......@@ -106,9 +106,9 @@ module Gitlab
end
def elasticsearch_config(target)
config = Gitlab::CurrentSettings.elasticsearch_config.dup
config[:index_name] = target.index_name
config.to_json
Gitlab::CurrentSettings.elasticsearch_config.merge(
index_name: target.index_name
).to_json
end
def gitaly_connection_info
......
......@@ -282,8 +282,7 @@ describe Gitlab::Elastic::Indexer do
end
def elasticsearch_config
config = Gitlab::CurrentSettings.elasticsearch_config.dup
config.merge!(
Gitlab::CurrentSettings.elasticsearch_config.merge(
index_name: 'gitlab-test'
)
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