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
fa1d6ec2
Commit
fa1d6ec2
authored
Mar 12, 2018
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 'Geo: Don't attempt to expire the cache after a failed clone'
parent
3448d722
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
1 deletion
+35
-1
ee/app/models/ee/repository.rb
ee/app/models/ee/repository.rb
+1
-1
ee/changelogs/unreleased/5197-geo-don-t-attempt-to-expire-the-cache-after-a-failed-clone.yml
...on-t-attempt-to-expire-the-cache-after-a-failed-clone.yml
+5
-0
ee/spec/models/repository_spec.rb
ee/spec/models/repository_spec.rb
+29
-0
No files found.
ee/app/models/ee/repository.rb
View file @
fa1d6ec2
...
...
@@ -18,7 +18,7 @@ module EE
# Runs code after a repository has been synced.
def
after_sync
expire_all_method_caches
expire_branch_cache
expire_branch_cache
if
exists?
expire_content_cache
end
...
...
ee/changelogs/unreleased/5197-geo-don-t-attempt-to-expire-the-cache-after-a-failed-clone.yml
0 → 100644
View file @
fa1d6ec2
---
title
:
'
Fix
'
'
Geo:
Don'
'
t
attempt
to
expire
the
cache
after
a
failed
clone'
'
'
merge_request
:
author
:
type
:
fixed
ee/spec/models/repository_spec.rb
0 → 100644
View file @
fa1d6ec2
require
'spec_helper'
describe
Repository
do
include
RepoHelpers
TestBlob
=
Struct
.
new
(
:path
)
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:repository
)
{
project
.
repository
}
describe
'#after_sync'
do
it
'expires repository cache'
do
expect
(
repository
).
to
receive
(
:expire_all_method_caches
)
expect
(
repository
).
to
receive
(
:expire_branch_cache
)
expect
(
repository
).
to
receive
(
:expire_content_cache
)
repository
.
after_sync
end
it
'does not call expire_branch_cache if repository does not exist'
do
allow
(
repository
).
to
receive
(
:exists?
).
and_return
(
false
)
expect
(
repository
).
to
receive
(
:expire_all_method_caches
)
expect
(
repository
).
not_to
receive
(
:expire_branch_cache
)
expect
(
repository
).
to
receive
(
:expire_content_cache
)
repository
.
after_sync
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