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
8a2a07cd
Commit
8a2a07cd
authored
Dec 03, 2020
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug in ProjectRepositoryStorageMove transition to scheduled
parent
4a92beb1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
app/models/project_repository_storage_move.rb
app/models/project_repository_storage_move.rb
+1
-1
changelogs/unreleased/fj-fix-bug-project-repository-storage-move.yml
...unreleased/fj-fix-bug-project-repository-storage-move.yml
+5
-0
spec/models/project_repository_storage_move_spec.rb
spec/models/project_repository_storage_move_spec.rb
+11
-0
No files found.
app/models/project_repository_storage_move.rb
View file @
8a2a07cd
...
...
@@ -52,7 +52,7 @@ class ProjectRepositoryStorageMove < ApplicationRecord
begin
storage_move
.
project
.
set_repository_read_only!
(
skip_git_transfer_check:
true
)
rescue
=>
err
errors
.
add
(
:project
,
err
.
message
)
storage_move
.
errors
.
add
(
:project
,
err
.
message
)
next
false
end
...
...
changelogs/unreleased/fj-fix-bug-project-repository-storage-move.yml
0 → 100644
View file @
8a2a07cd
---
title
:
Fix bug in ProjectRepositoryStorageMove transition to scheduled
merge_request
:
49105
author
:
type
:
fixed
spec/models/project_repository_storage_move_spec.rb
View file @
8a2a07cd
...
...
@@ -73,6 +73,17 @@ RSpec.describe ProjectRepositoryStorageMove, type: :model do
expect
(
project
).
to
be_repository_read_only
end
context
'when the transition fails'
do
it
'does not trigger ProjectUpdateRepositoryStorageWorker and adds an error'
do
allow
(
storage_move
.
project
).
to
receive
(
:set_repository_read_only!
).
and_raise
(
StandardError
,
'foobar'
)
expect
(
ProjectUpdateRepositoryStorageWorker
).
not_to
receive
(
:perform_async
)
storage_move
.
schedule!
expect
(
storage_move
.
errors
[
:project
]).
to
include
(
'foobar'
)
end
end
end
context
'and transits to started'
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