debian-mirror-gitlab/db/fixtures/development/06_teams.rb

26 lines
612 B
Ruby
Raw Normal View History

2020-01-01 13:55:28 +05:30
require './spec/support/sidekiq_middleware'
2017-08-17 22:00:37 +05:30
Sidekiq::Testing.inline! do
Gitlab::Seeder.quiet do
Group.all.each do |group|
2019-12-26 22:10:19 +05:30
User.not_mass_generated.sample(4).each do |user|
2017-08-17 22:00:37 +05:30
if group.add_user(user, Gitlab::Access.values.sample).persisted?
print '.'
else
print 'F'
end
2014-09-02 18:07:02 +05:30
end
end
2019-12-26 22:10:19 +05:30
Project.not_mass_generated.each do |project|
User.not_mass_generated.sample(4).each do |user|
2018-03-17 18:26:18 +05:30
if project.add_role(user, Gitlab::Access.sym_options.keys.sample)
2017-08-17 22:00:37 +05:30
print '.'
else
print 'F'
end
2014-09-02 18:07:02 +05:30
end
end
end
end