summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-12-06 14:19:24 +0000
committerDouwe Maan <douwe@gitlab.com>2018-12-06 14:19:24 +0000
commit828ba8c908d58dfda88768bc838a7ef0f84c8102 (patch)
tree0a97c6a84c4a3a54a0dec936614034589be1e454 /db
parent6caaca1d3cbb0b65993795fb1059c19e7b04b421 (diff)
parentb281627fbd296eefc06773ecbe10f49f48a8340c (diff)
downloadgitlab-ce-828ba8c908d58dfda88768bc838a7ef0f84c8102.tar.gz
Merge branch 'zj-fixture-fork' into 'master'
Fixture for forks See merge request gitlab-org/gitlab-ce!23613
Diffstat (limited to 'db')
-rw-r--r--db/fixtures/development/24_forks.rb16
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