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
9a41378b
Commit
9a41378b
authored
Dec 06, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken seeder 11.6
parent
ec2c268b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
db/fixtures/development/04_project.rb
db/fixtures/development/04_project.rb
+6
-1
db/fixtures/development/10_merge_requests.rb
db/fixtures/development/10_merge_requests.rb
+9
-3
No files found.
db/fixtures/development/04_project.rb
View file @
9a41378b
...
...
@@ -71,13 +71,18 @@ Sidekiq::Testing.inline! do
params
[
:storage_version
]
=
Project
::
LATEST_STORAGE_VERSION
end
project
=
Projects
::
CreateService
.
new
(
User
.
first
,
params
).
execute
project
=
nil
Sidekiq
::
Worker
.
skipping_transaction_check
do
project
=
Projects
::
CreateService
.
new
(
User
.
first
,
params
).
execute
end
# Seed-Fu runs this entire fixture in a transaction, so the `after_commit`
# hook won't run until after the fixture is loaded. That is too late
# since the Sidekiq::Testing block has already exited. Force clearing
# the `after_commit` queue to ensure the job is run now.
Sidekiq
::
Worker
.
skipping_transaction_check
do
project
.
send
(
:_run_after_commit_queue
)
project
.
import_state
.
send
(
:_run_after_commit_queue
)
end
if
project
.
valid?
&&
project
.
valid_repo?
...
...
db/fixtures/development/10_merge_requests.rb
View file @
9a41378b
...
...
@@ -25,7 +25,9 @@ Gitlab::Seeder.quiet do
developer
=
project
.
team
.
developers
.
sample
break
unless
developer
MergeRequests
::
CreateService
.
new
(
project
,
developer
,
params
).
execute
Sidekiq
::
Worker
.
skipping_transaction_check
do
MergeRequests
::
CreateService
.
new
(
project
,
developer
,
params
).
execute
end
print
'.'
end
end
...
...
@@ -39,7 +41,9 @@ Gitlab::Seeder.quiet do
target_branch:
'master'
,
title:
'Can be automatically merged'
}
MergeRequests
::
CreateService
.
new
(
project
,
User
.
admins
.
first
,
params
).
execute
Sidekiq
::
Worker
.
skipping_transaction_check
do
MergeRequests
::
CreateService
.
new
(
project
,
User
.
admins
.
first
,
params
).
execute
end
print
'.'
params
=
{
...
...
@@ -47,6 +51,8 @@ Gitlab::Seeder.quiet do
target_branch:
'feature'
,
title:
'Cannot be automatically merged'
}
MergeRequests
::
CreateService
.
new
(
project
,
User
.
admins
.
first
,
params
).
execute
Sidekiq
::
Worker
.
skipping_transaction_check
do
MergeRequests
::
CreateService
.
new
(
project
,
User
.
admins
.
first
,
params
).
execute
end
print
'.'
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