diff options
Diffstat (limited to 'db/fixtures/development')
4 files changed, 14 insertions, 12 deletions
diff --git a/db/fixtures/development/15_award_emoji.rb b/db/fixtures/development/15_award_emoji.rb index 2b69a6c26ab..efad7e92bb0 100644 --- a/db/fixtures/development/15_award_emoji.rb +++ b/db/fixtures/development/15_award_emoji.rb @@ -1,15 +1,13 @@ require './spec/support/sidekiq_middleware' Gitlab::Seeder.quiet do - EMOJI = Gitlab::Emoji.emojis.keys - def seed_award_emoji(klass) klass.order(Gitlab::Database.random).limit(klass.count / 2).each do |awardable| awardable.project.authorized_users.where('project_authorizations.access_level > ?', Gitlab::Access::GUEST).sample(2).each do |user| - AwardEmojis::AddService.new(awardable, EMOJI.sample, user).execute + AwardEmojis::AddService.new(awardable, TanukiEmoji.index.all.sample.name, user).execute awardable.notes.user.sample(2).each do |note| - AwardEmojis::AddService.new(note, EMOJI.sample, user).execute + AwardEmojis::AddService.new(note, TanukiEmoji.index.all.sample.name, user).execute end print '.' diff --git a/db/fixtures/development/17_cycle_analytics.rb b/db/fixtures/development/17_cycle_analytics.rb index 95d956fb402..fa19775a571 100644 --- a/db/fixtures/development/17_cycle_analytics.rb +++ b/db/fixtures/development/17_cycle_analytics.rb @@ -157,16 +157,17 @@ class Gitlab::Seeder::CycleAnalytics end def create_new_vsm_project + namespace = FactoryBot.create( + :group, + name: "Value Stream Management Group #{suffix}", + path: "vsmg-#{suffix}" + ) project = FactoryBot.create( :project, name: "Value Stream Management Project #{suffix}", path: "vsmp-#{suffix}", creator: admin, - namespace: FactoryBot.create( - :group, - name: "Value Stream Management Group #{suffix}", - path: "vsmg-#{suffix}" - ) + namespace: namespace ) project.create_repository diff --git a/db/fixtures/development/20_nested_groups.rb b/db/fixtures/development/20_nested_groups.rb index 8f64dfbd644..d9aea17aa16 100644 --- a/db/fixtures/development/20_nested_groups.rb +++ b/db/fixtures/development/20_nested_groups.rb @@ -23,8 +23,9 @@ Sidekiq::Testing.inline! do full_path = url.sub('https://android.googlesource.com/', '') full_path = full_path.sub(/\.git\z/, '') full_path, _, project_path = full_path.rpartition('/') - group = Group.find_by_full_path(full_path) || - Groups::NestedCreateService.new(user, group_path: full_path).execute + group = Sidekiq::Worker.skipping_transaction_check do + Group.find_by_full_path(full_path) || Groups::NestedCreateService.new(user, group_path: full_path).execute + end params = { import_url: url, diff --git a/db/fixtures/development/98_gitlab_instance_administration_project.rb b/db/fixtures/development/98_gitlab_instance_administration_project.rb index 8be707ffb08..9f50ce6a7e4 100644 --- a/db/fixtures/development/98_gitlab_instance_administration_project.rb +++ b/db/fixtures/development/98_gitlab_instance_administration_project.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true -response = ::Gitlab::DatabaseImporters::SelfMonitoring::Project::CreateService.new.execute +response = Sidekiq::Worker.skipping_transaction_check do + ::Gitlab::DatabaseImporters::SelfMonitoring::Project::CreateService.new.execute +end if response[:status] == :success puts "Successfully created self monitoring project." |