diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-12-06 10:42:55 +0100 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-12-06 13:20:32 +0100 |
commit | b281627fbd296eefc06773ecbe10f49f48a8340c (patch) | |
tree | 8898234f8f8548ba1113cb4e541e1b2c0a009397 /db/fixtures | |
parent | 76d4e6d6d87f3e59f1864fa15da701bb789e301e (diff) | |
download | gitlab-ce-b281627fbd296eefc06773ecbe10f49f48a8340c.tar.gz |
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.
Diffstat (limited to 'db/fixtures')
-rw-r--r-- | db/fixtures/development/24_forks.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/fixtures/development/24_forks.rb b/db/fixtures/development/24_forks.rb new file mode 100644 index 00000000000..61e39c871e6 --- /dev/null +++ b/db/fixtures/development/24_forks.rb @@ -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 |