summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-10-08 10:39:37 -0700
committerStan Hu <stanhu@gmail.com>2015-10-08 10:39:37 -0700
commit680b6d88a5c0d63deeb2909f1c83e3630db87780 (patch)
tree1deb68dbe044c5795873f9560d6e105ff5212589
parent9440589197238d82d1121f24af6dbf4d2d557389 (diff)
parent6db238dee9379bc588b20dc49274dd48945142c8 (diff)
downloadgitlab-ce-680b6d88a5c0d63deeb2909f1c83e3630db87780.tar.gz
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
-rw-r--r--db/fixtures/development/04_project.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/db/fixtures/development/04_project.rb b/db/fixtures/development/04_project.rb
index 8f71198e47f..b4639999967 100644
--- a/db/fixtures/development/04_project.rb
+++ b/db/fixtures/development/04_project.rb
@@ -73,8 +73,13 @@ Sidekiq::Testing.inline! do
}
project = Projects::CreateService.new(User.first, params).execute
+ # 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.
+ project.send(:_run_after_commit_queue)
- if project.valid?
+ if project.valid? && project.valid_repo?
print '.'
else
puts project.errors.full_messages