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
30110a3a
Commit
30110a3a
authored
Aug 10, 2021
by
Maxime Orefice
Committed by
Kerri Miller
Aug 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refresh ci minutes in ChangeNamespaceService
parent
97d7663d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
ee/app/services/ci/minutes/additional_packs/change_namespace_service.rb
...s/ci/minutes/additional_packs/change_namespace_service.rb
+6
-0
ee/spec/services/ci/minutes/additional_packs/change_namespace_service_spec.rb
...minutes/additional_packs/change_namespace_service_spec.rb
+12
-0
No files found.
ee/app/services/ci/minutes/additional_packs/change_namespace_service.rb
View file @
30110a3a
...
...
@@ -20,6 +20,7 @@ module Ci
Ci
::
Minutes
::
AdditionalPack
.
transaction
do
update_packs
reset_ci_minutes!
success
end
...
...
@@ -53,6 +54,11 @@ module Ci
raise
ChangeNamespaceError
,
'Both namespaces must share the same owner'
unless
shared_ids
.
any?
end
def
reset_ci_minutes!
::
Ci
::
Minutes
::
RefreshCachedDataService
.
new
(
namespace
).
execute
::
Ci
::
Minutes
::
RefreshCachedDataService
.
new
(
target
).
execute
end
end
end
end
...
...
ee/spec/services/ci/minutes/additional_packs/change_namespace_service_spec.rb
View file @
30110a3a
...
...
@@ -40,6 +40,18 @@ RSpec.describe Ci::Minutes::AdditionalPacks::ChangeNamespaceService do
expect
(
change_namespace
[
:status
]).
to
eq
:success
end
it
'kicks off refresh ci minutes service for namespace and target'
do
expect_next_instance_of
(
::
Ci
::
Minutes
::
RefreshCachedDataService
,
namespace
)
do
|
instance
|
expect
(
instance
).
to
receive
(
:execute
)
end
expect_next_instance_of
(
::
Ci
::
Minutes
::
RefreshCachedDataService
,
target
)
do
|
instance
|
expect
(
instance
).
to
receive
(
:execute
)
end
change_namespace
end
context
'when updating packs fails'
do
before
do
allow_next_instance_of
(
described_class
)
do
|
instance
|
...
...
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