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
06f71eaa
Commit
06f71eaa
authored
Nov 15, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More specs for Geo cache update
parent
e39652bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
spec/workers/project_cache_worker_spec.rb
spec/workers/project_cache_worker_spec.rb
+17
-0
No files found.
spec/workers/project_cache_worker_spec.rb
View file @
06f71eaa
...
@@ -39,6 +39,8 @@ describe ProjectCacheWorker do
...
@@ -39,6 +39,8 @@ describe ProjectCacheWorker do
expect_any_instance_of
(
Project
).
to
receive
(
:update_repository_size
)
expect_any_instance_of
(
Project
).
to
receive
(
:update_repository_size
)
expect_any_instance_of
(
Project
).
to
receive
(
:update_commit_count
)
expect_any_instance_of
(
Project
).
to
receive
(
:update_commit_count
)
expect_any_instance_of
(
Repository
).
to
receive
(
:build_cache
).
and_call_original
subject
.
perform
(
project
.
id
)
subject
.
perform
(
project
.
id
)
end
end
...
@@ -48,6 +50,21 @@ describe ProjectCacheWorker do
...
@@ -48,6 +50,21 @@ describe ProjectCacheWorker do
subject
.
perform
(
project
.
id
)
subject
.
perform
(
project
.
id
)
end
end
context
'when in Geo secondary node'
do
before
do
allow
(
Gitlab
::
Geo
).
to
receive
(
:secondary?
)
{
true
}
end
it
'updates only non database cache'
do
expect_any_instance_of
(
Repository
).
to
receive
(
:build_cache
).
and_call_original
expect_any_instance_of
(
Project
).
not_to
receive
(
:update_repository_size
)
expect_any_instance_of
(
Project
).
not_to
receive
(
:update_commit_count
)
subject
.
perform
(
project
.
id
)
end
end
end
end
context
'when an exclusive lease can not be obtained'
do
context
'when an exclusive lease can not be obtained'
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