Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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.rb23
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)