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
d4662859
Commit
d4662859
authored
Dec 21, 2021
by
Aleksei Lipniagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more specs (fix undercoverage)
parent
4749cc22
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
spec/lib/gitlab/redis/multi_store_spec.rb
spec/lib/gitlab/redis/multi_store_spec.rb
+40
-0
No files found.
spec/lib/gitlab/redis/multi_store_spec.rb
View file @
d4662859
...
...
@@ -646,6 +646,26 @@ RSpec.describe Gitlab::Redis::MultiStore do
expect
(
multi_store
.
use_primary_and_secondary_stores?
).
to
be
false
end
end
context
'with empty DB'
do
before
do
allow
(
Feature
::
FlipperFeature
).
to
receive
(
:table_exists?
).
and_return
(
false
)
end
it
'multi store is disabled'
do
expect
(
multi_store
.
use_primary_and_secondary_stores?
).
to
be
false
end
end
context
'when FF table guard raises'
do
before
do
allow
(
Feature
::
FlipperFeature
).
to
receive
(
:table_exists?
).
and_raise
end
it
'multi store is disabled'
do
expect
(
multi_store
.
use_primary_and_secondary_stores?
).
to
be
false
end
end
end
describe
'#use_primary_store_as_default?'
do
...
...
@@ -668,6 +688,26 @@ RSpec.describe Gitlab::Redis::MultiStore do
expect
(
multi_store
.
use_primary_store_as_default?
).
to
be
false
end
end
context
'with empty DB'
do
before
do
allow
(
Feature
::
FlipperFeature
).
to
receive
(
:table_exists?
).
and_return
(
false
)
end
it
'multi store is disabled'
do
expect
(
multi_store
.
use_primary_and_secondary_stores?
).
to
be
false
end
end
context
'when FF table guard raises'
do
before
do
allow
(
Feature
::
FlipperFeature
).
to
receive
(
:table_exists?
).
and_raise
end
it
'multi store is disabled'
do
expect
(
multi_store
.
use_primary_and_secondary_stores?
).
to
be
false
end
end
end
def
create_redis_store
(
options
,
extras
=
{})
...
...
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