Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f24521cd
Commit
f24521cd
authored
Jul 03, 2019
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ES: Fix spec to read mappings/settings through proxy
parent
fcc33642
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ee/lib/gitlab/elastic/helper.rb
ee/lib/gitlab/elastic/helper.rb
+2
-2
ee/spec/models/concerns/elastic/snippet_spec.rb
ee/spec/models/concerns/elastic/snippet_spec.rb
+2
-2
No files found.
ee/lib/gitlab/elastic/helper.rb
View file @
f24521cd
...
...
@@ -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
...
...
ee/spec/models/concerns/elastic/snippet_spec.rb
View file @
f24521cd
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment