Fixture for forks

Forks influence the working of GitLab, and now getting in a fork is a
situation that's harder than it needs to be.
This commit is contained in:
Zeger-Jan van de Weg 2018-12-06 10:42:55 +01:00
parent 76d4e6d6d8
commit b281627fbd
No known key found for this signature in database
GPG Key ID: 65F6A8D64A88ABAC
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
require './spec/support/sidekiq'
Sidekiq::Testing.inline! do
Gitlab::Seeder.quiet do
User.all.sample(10).each do |user|
source_project = Project.public_only.sample
fork_project = Projects::ForkService.new(source_project, user, namespace: user.namespace).execute
if fork_project.valid?
puts '.'
else
puts 'F'
end
end
end
end