diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 14:22:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 14:22:11 +0000 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /spec/migrations/reschedule_backfill_imported_issue_search_data_spec.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) | |
download | gitlab-ce-0c872e02b2c822e3397515ec324051ff540f0cd5.tar.gz |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'spec/migrations/reschedule_backfill_imported_issue_search_data_spec.rb')
-rw-r--r-- | spec/migrations/reschedule_backfill_imported_issue_search_data_spec.rb | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/spec/migrations/reschedule_backfill_imported_issue_search_data_spec.rb b/spec/migrations/reschedule_backfill_imported_issue_search_data_spec.rb index 7581c201a59..fe730f452f7 100644 --- a/spec/migrations/reschedule_backfill_imported_issue_search_data_spec.rb +++ b/spec/migrations/reschedule_backfill_imported_issue_search_data_spec.rb @@ -3,8 +3,8 @@ require 'spec_helper' require_migration! -RSpec.describe RescheduleBackfillImportedIssueSearchData do - let_it_be(:reschedule_migration) { described_class::MIGRATION } +RSpec.describe RescheduleBackfillImportedIssueSearchData, feature_category: :global_search do + let!(:reschedule_migration) { described_class::MIGRATION } def create_batched_migration(max_value:) Gitlab::Database::BackgroundMigration::BatchedMigration @@ -55,12 +55,23 @@ RSpec.describe RescheduleBackfillImportedIssueSearchData do end context 'when an issue is available' do - let_it_be(:namespaces_table) { table(:namespaces) } - let_it_be(:projects_table) { table(:projects) } + let!(:namespaces_table) { table(:namespaces) } + let!(:projects_table) { table(:projects) } let(:namespace) { namespaces_table.create!(name: 'gitlab-org', path: 'gitlab-org') } - let(:project) { projects_table.create!(name: 'gitlab', path: 'gitlab-org/gitlab-ce', namespace_id: namespace.id, project_namespace_id: namespace.id) } # rubocop:disable Layout/LineLength - let(:issue) { table(:issues).create!(project_id: project.id, title: 'test title', description: 'test description') } + + let(:project) do + projects_table.create!( + name: 'gitlab', path: 'gitlab-org/gitlab-ce', namespace_id: namespace.id, project_namespace_id: namespace.id + ) + end + + let(:issue) do + table(:issues).create!( + project_id: project.id, namespace_id: project.project_namespace_id, + title: 'test title', description: 'test description' + ) + end before do create_batched_migration(max_value: max_value) |