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
c4965142
Commit
c4965142
authored
Oct 14, 2021
by
nmilojevic1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addressed Maintainer feedback
parent
166458db
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
doc/development/redis.md
doc/development/redis.md
+1
-1
spec/support/redis/redis_helpers.rb
spec/support/redis/redis_helpers.rb
+1
-1
spec/support/redis/redis_new_instance_shared_examples.rb
spec/support/redis/redis_new_instance_shared_examples.rb
+5
-5
No files found.
doc/development/redis.md
View file @
c4965142
...
@@ -16,7 +16,7 @@ GitLab uses [Redis](https://redis.io) for the following distinct purposes:
...
@@ -16,7 +16,7 @@ GitLab uses [Redis](https://redis.io) for the following distinct purposes:
-
To store CI trace chunks.
-
To store CI trace chunks.
-
As a Pub/Sub queue backend for ActionCable.
-
As a Pub/Sub queue backend for ActionCable.
-
Rate limiting state storage.
-
Rate limiting state storage.
-
Sessions
-
Sessions
.
In most environments (including the GDK), all of these point to the same
In most environments (including the GDK), all of these point to the same
Redis instance.
Redis instance.
...
...
spec/support/redis/redis_helpers.rb
View file @
c4965142
...
@@ -30,6 +30,6 @@ module RedisHelpers
...
@@ -30,6 +30,6 @@ module RedisHelpers
# Usage: session state
# Usage: session state
def
redis_sessions_cleanup!
def
redis_sessions_cleanup!
Gitlab
::
Redis
::
Session
.
with
(
&
:flushdb
)
Gitlab
::
Redis
::
Session
s
.
with
(
&
:flushdb
)
end
end
end
end
spec/support/redis/redis_new_instance_shared_examples.rb
View file @
c4965142
...
@@ -5,10 +5,10 @@ require 'spec_helper'
...
@@ -5,10 +5,10 @@ require 'spec_helper'
RSpec
.
shared_examples
"redis_new_instance_shared_examples"
do
|
name
,
fallback_class
|
RSpec
.
shared_examples
"redis_new_instance_shared_examples"
do
|
name
,
fallback_class
|
let
(
:instance_specific_config_file
)
{
"config/redis.
#{
name
}
.yml"
}
let
(
:instance_specific_config_file
)
{
"config/redis.
#{
name
}
.yml"
}
let
(
:environment_config_file_name
)
{
"GITLAB_REDIS_
#{
name
.
upcase
}
_CONFIG_FILE"
}
let
(
:environment_config_file_name
)
{
"GITLAB_REDIS_
#{
name
.
upcase
}
_CONFIG_FILE"
}
let
(
:
shared_state
_config_file
)
{
nil
}
let
(
:
fallback
_config_file
)
{
nil
}
before
do
before
do
allow
(
fallback_class
).
to
receive
(
:config_file_name
).
and_return
(
shared_state
_config_file
)
allow
(
fallback_class
).
to
receive
(
:config_file_name
).
and_return
(
fallback
_config_file
)
end
end
include_examples
"redis_shared_examples"
include_examples
"redis_shared_examples"
...
@@ -44,10 +44,10 @@ RSpec.shared_examples "redis_new_instance_shared_examples" do |name, fallback_cl
...
@@ -44,10 +44,10 @@ RSpec.shared_examples "redis_new_instance_shared_examples" do |name, fallback_cl
it
{
expect
(
subject
).
to
eq
(
'global override'
)
}
it
{
expect
(
subject
).
to
eq
(
'global override'
)
}
context
'and SharedState has a different config file'
do
context
"and
#{
fallback_class
.
name
.
demodulize
}
has a different config file"
do
let
(
:
shared_state_config_file
)
{
'shared state
config file'
}
let
(
:
fallback_config_file
)
{
'fallback
config file'
}
it
{
expect
(
subject
).
to
eq
(
'
shared state
config file'
)
}
it
{
expect
(
subject
).
to
eq
(
'
fallback
config file'
)
}
end
end
end
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