diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /db/fixtures | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'db/fixtures')
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." |