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

26 lines
629 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
2022-06-21 17:19:12 +05:30
Group.not_mass_generated.each do |group|
2019-12-26 22:10:19 +05:30
User.not_mass_generated.sample(4).each do |user|
2022-08-13 15:12:31 +05:30
if group.add_member(user, Gitlab::Access.values.sample).persisted?
2017-08-17 22:00:37 +05:30
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