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
35d73747
Commit
35d73747
authored
Jun 02, 2021
by
Abdul Wadood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add clean_gitlab_redis_shared_state to indexer_spec.rb
To clear shared redis state
parent
c1b5d0d7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
ee/spec/lib/gitlab/elastic/indexer_spec.rb
ee/spec/lib/gitlab/elastic/indexer_spec.rb
+8
-8
No files found.
ee/spec/lib/gitlab/elastic/indexer_spec.rb
View file @
35d73747
...
...
@@ -21,7 +21,7 @@ RSpec.describe Gitlab::Elastic::Indexer do
subject
(
:indexer
)
{
described_class
.
new
(
project
)
}
context
'empty project'
,
:elastic
do
context
'empty project'
,
:elastic
,
:clean_gitlab_redis_shared_state
do
let
(
:project
)
{
create
(
:project
)
}
it
'updates the index status without running the indexing command'
do
...
...
@@ -32,7 +32,7 @@ RSpec.describe Gitlab::Elastic::Indexer do
expect_index_status
(
Gitlab
::
Git
::
BLANK_SHA
)
end
context
'when indexing an unborn head'
,
:elastic
do
context
'when indexing an unborn head'
,
:elastic
,
:clean_gitlab_redis_shared_state
do
it
'updates the index status without running the indexing command'
do
allow
(
project
.
repository
).
to
receive
(
:exists?
).
and_return
(
false
)
expect_popen
.
never
...
...
@@ -55,7 +55,7 @@ RSpec.describe Gitlab::Elastic::Indexer do
end
end
context
'with an indexed project'
,
:elastic
do
context
'with an indexed project'
,
:elastic
,
:clean_gitlab_redis_shared_state
do
let
(
:to_sha
)
{
project
.
repository
.
commit
.
sha
}
before
do
...
...
@@ -80,7 +80,7 @@ RSpec.describe Gitlab::Elastic::Indexer do
end
end
context
'when indexing a HEAD commit'
,
:elastic
do
context
'when indexing a HEAD commit'
,
:elastic
,
:clean_gitlab_redis_shared_state
do
it_behaves_like
'index up to the specified commit'
it
'runs the indexing command'
do
...
...
@@ -130,7 +130,7 @@ RSpec.describe Gitlab::Elastic::Indexer do
end
end
context
'when indexing a non-HEAD commit'
,
:elastic
do
context
'when indexing a non-HEAD commit'
,
:elastic
,
:clean_gitlab_redis_shared_state
do
let
(
:to_sha
)
{
project
.
repository
.
commit
(
'HEAD~1'
).
sha
}
it_behaves_like
'index up to the specified commit'
...
...
@@ -201,7 +201,7 @@ RSpec.describe Gitlab::Elastic::Indexer do
end
end
context
"when indexing a project's wiki"
,
:elastic
do
context
"when indexing a project's wiki"
,
:elastic
,
:clean_gitlab_redis_shared_state
do
let
(
:project
)
{
create
(
:project
,
:wiki_repo
)
}
let
(
:indexer
)
{
described_class
.
new
(
project
,
wiki:
true
)
}
let
(
:to_sha
)
{
project
.
wiki
.
repository
.
commit
(
'master'
).
sha
}
...
...
@@ -358,7 +358,7 @@ RSpec.describe Gitlab::Elastic::Indexer do
end
end
context
'when a file is larger than elasticsearch_indexed_file_size_limit_kb'
,
:elastic
do
context
'when a file is larger than elasticsearch_indexed_file_size_limit_kb'
,
:elastic
,
:clean_gitlab_redis_shared_state
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
...
...
@@ -377,7 +377,7 @@ RSpec.describe Gitlab::Elastic::Indexer do
end
end
context
'when a file path is larger than elasticsearch max size of 512 bytes'
,
:elastic
do
context
'when a file path is larger than elasticsearch max size of 512 bytes'
,
:elastic
,
:clean_gitlab_redis_shared_state
do
let
(
:long_path
)
{
"
#{
'a'
*
1000
}
_file.txt"
}
before
do
...
...
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