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
d1a3aef5
Commit
d1a3aef5
authored
Apr 24, 2018
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix undefined method pending_delete for nil class
parent
aa78453c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
ee/app/workers/geo/repository_verification/secondary/single_worker.rb
...rs/geo/repository_verification/secondary/single_worker.rb
+1
-1
ee/spec/workers/geo/repository_verification/secondary/single_worker_spec.rb
...o/repository_verification/secondary/single_worker_spec.rb
+6
-0
No files found.
ee/app/workers/geo/repository_verification/secondary/single_worker.rb
View file @
d1a3aef5
...
...
@@ -18,7 +18,7 @@ module Geo
return
unless
Gitlab
::
Geo
.
secondary?
@registry
=
Geo
::
ProjectRegistry
.
find_by_id
(
registry_id
)
return
if
registry
.
nil?
||
project
.
pending_delete?
return
if
registry
.
nil?
||
project
.
nil?
||
project
.
pending_delete?
try_obtain_lease
do
verify_checksum
(
:repository
)
...
...
ee/spec/workers/geo/repository_verification/secondary/single_worker_spec.rb
View file @
d1a3aef5
...
...
@@ -36,6 +36,12 @@ describe Geo::RepositoryVerification::Secondary::SingleWorker, :postgresql, :cle
expect
{
subject
.
perform
(
-
1
)
}.
not_to
raise_error
end
it
'does not raise an error when project could not be found'
do
registry
.
update_column
(
:project_id
,
-
1
)
expect
{
subject
.
perform
(
registry
.
id
)
}.
not_to
raise_error
end
it
'runs verification for both repository and wiki'
do
create
(
:repository_state
,
project:
project
,
repository_verification_checksum:
'my_checksum'
,
wiki_verification_checksum:
'my_checksum'
)
...
...
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