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/backfill_project_namespaces_for_group_spec.rb')
-rw-r--r--spec/migrations/backfill_project_namespaces_for_group_spec.rb43
1 files changed, 0 insertions, 43 deletions
diff --git a/spec/migrations/backfill_project_namespaces_for_group_spec.rb b/spec/migrations/backfill_project_namespaces_for_group_spec.rb
deleted file mode 100644
index b21ed6e1aa2..00000000000
--- a/spec/migrations/backfill_project_namespaces_for_group_spec.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require_migration!
-
-RSpec.describe BackfillProjectNamespacesForGroup, feature_category: :subgroups do
- let!(:migration) { described_class::MIGRATION }
-
- let(:projects) { table(:projects) }
- let(:namespaces) { table(:namespaces) }
- let(:parent_group1) { namespaces.create!(name: 'parent_group1', path: 'parent_group1', visibility_level: 20, type: 'Group') }
- let!(:parent_group1_project) { projects.create!(name: 'parent_group1_project', path: 'parent_group1_project', namespace_id: parent_group1.id, visibility_level: 20) }
-
- before do
- allow(Gitlab).to receive(:com?).and_return(true)
- end
-
- describe '#up' do
- before do
- stub_const("BackfillProjectNamespacesForGroup::GROUP_ID", parent_group1.id)
- end
-
- it 'schedules background jobs for each batch of namespaces' do
- migrate!
-
- expect(migration).to have_scheduled_batched_migration(
- table_name: :projects,
- column_name: :id,
- job_arguments: [described_class::GROUP_ID, 'up'],
- interval: described_class::DELAY_INTERVAL
- )
- end
- end
-
- describe '#down' do
- it 'deletes all batched migration records' do
- migrate!
- schema_migrate_down!
-
- expect(migration).not_to have_scheduled_batched_migration
- end
- end
-end