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
6a8e9b2a
Commit
6a8e9b2a
authored
Mar 23, 2021
by
Mike Kozono
Committed by
Douglas Barbosa Alexandre
Mar 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Isolate the test
In preparation for adding verification to another replicator.
parent
85f03822
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
ee/spec/lib/gitlab/geo_spec.rb
ee/spec/lib/gitlab/geo_spec.rb
+11
-1
No files found.
ee/spec/lib/gitlab/geo_spec.rb
View file @
6a8e9b2a
...
...
@@ -406,7 +406,7 @@ RSpec.describe Gitlab::Geo, :geo, :request_store do
context
'when there are no Replicator classes with verification enabled'
do
it
'returns the total capacity'
do
stub_feature_flags
(
geo_package_file_verification:
false
)
allow
(
described_class
).
to
receive
(
:verification_enabled_replicator_classes
).
and_return
([]
)
expect
(
described_class
.
verification_max_capacity_per_replicator_class
).
to
eq
(
verification_max_capacity
)
end
...
...
@@ -414,10 +414,20 @@ RSpec.describe Gitlab::Geo, :geo, :request_store do
context
'when there is 1 Replicator class with verification enabled'
do
it
'returns half capacity'
do
allow
(
described_class
).
to
receive
(
:verification_enabled_replicator_classes
).
and_return
([
'a replicator class'
])
expect
(
described_class
.
verification_max_capacity_per_replicator_class
).
to
eq
(
verification_max_capacity
/
2
)
end
end
context
'when there are 2 Replicator classes with verification enabled'
do
it
'returns a third of total capacity'
do
allow
(
described_class
).
to
receive
(
:verification_enabled_replicator_classes
).
and_return
([
'a replicator class'
,
'another replicator class'
])
expect
(
described_class
.
verification_max_capacity_per_replicator_class
).
to
eq
(
verification_max_capacity
/
3
)
end
end
context
'when total capacity is set lower than the number of Replicators'
do
let
(
:verification_max_capacity
)
{
1
}
...
...
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