Commit f24521cd authored by Mark Chao's avatar Mark Chao

ES: Fix spec to read mappings/settings through proxy

parent fcc33642
......@@ -19,8 +19,8 @@ module Gitlab
ProjectWiki,
Repository
].each do |klass|
settings.deep_merge!(klass.settings.to_hash)
mappings.deep_merge!(klass.mappings.to_hash)
settings.deep_merge!(klass.__elasticsearch__.settings.to_hash)
mappings.deep_merge!(klass.__elasticsearch__.mappings.to_hash)
end
client = Project.__elasticsearch__.client
......
......@@ -136,14 +136,14 @@ describe Snippet, :elastic do
'visibility_level'
).merge({ 'type' => snippet.es_type })
expect(snippet.as_indexed_json).to eq(expected_hash)
expect(snippet.__elasticsearch__.as_indexed_json).to eq(expected_hash)
end
it 'uses same index for Snippet subclasses' do
Snippet.subclasses.each do |snippet_class|
expect(snippet_class.index_name).to eq(Snippet.index_name)
expect(snippet_class.document_type).to eq(Snippet.document_type)
expect(snippet_class.mappings.to_hash).to eq(Snippet.mappings.to_hash)
expect(snippet_class.__elasticsearch__.mappings.to_hash).to eq(Snippet.__elasticsearch__.mappings.to_hash)
end
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