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
8e9f85ba
Commit
8e9f85ba
authored
Feb 28, 2020
by
Dmitry Gruzd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ES replicas setting validation
parent
328d1b1e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
ee/app/models/ee/application_setting.rb
ee/app/models/ee/application_setting.rb
+1
-1
ee/spec/models/application_setting_spec.rb
ee/spec/models/application_setting_spec.rb
+1
-1
No files found.
ee/app/models/ee/application_setting.rb
View file @
8e9f85ba
...
...
@@ -46,7 +46,7 @@ module EE
validates
:elasticsearch_replicas
,
presence:
true
,
numericality:
{
only_integer:
true
,
greater_than:
0
}
numericality:
{
only_integer:
true
,
greater_than
_or_equal_to
:
0
}
validates
:elasticsearch_max_bulk_size_mb
,
presence:
true
,
...
...
ee/spec/models/application_setting_spec.rb
View file @
8e9f85ba
...
...
@@ -36,8 +36,8 @@ describe ApplicationSetting do
it
{
is_expected
.
not_to
allow_value
(
-
1
).
for
(
:elasticsearch_shards
)
}
it
{
is_expected
.
to
allow_value
(
10
).
for
(
:elasticsearch_replicas
)
}
it
{
is_expected
.
to
allow_value
(
0
).
for
(
:elasticsearch_replicas
)
}
it
{
is_expected
.
not_to
allow_value
(
nil
).
for
(
:elasticsearch_replicas
)
}
it
{
is_expected
.
not_to
allow_value
(
0
).
for
(
:elasticsearch_replicas
)
}
it
{
is_expected
.
not_to
allow_value
(
1.1
).
for
(
:elasticsearch_replicas
)
}
it
{
is_expected
.
not_to
allow_value
(
-
1
).
for
(
:elasticsearch_replicas
)
}
...
...
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