...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::BackfillProjectFullpathInRepoConfig, :migration, schema: 20181010133639 do describe Gitlab::BackgroundMigration::BackfillProjectFullpathInRepoConfig, schema: 20181010133639 do
let(:namespaces) { table(:namespaces) } let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) } let(:projects) { table(:projects) }
let(:group) { namespaces.create!(name: 'foo', path: 'foo') } let(:group) { namespaces.create!(name: 'foo', path: 'foo') }
... ...
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
# rubocop:disable RSpec/FactoriesInMigrationSpecs # rubocop:disable RSpec/FactoriesInMigrationSpecs
describe Gitlab::BackgroundMigration::BackfillProjectRepositories do describe Gitlab::BackgroundMigration::BackfillProjectRepositories, schema: :latest do
let(:group) { create(:group, name: 'foo', path: 'foo') } let(:group) { create(:group, name: 'foo', path: 'foo') }
describe described_class::ShardFinder do describe described_class::ShardFinder do
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::BackfillProjectSettings, :migration, schema: 20200114113341 do describe Gitlab::BackgroundMigration::BackfillProjectSettings, schema: 20200114113341 do
let(:projects) { table(:projects) } let(:projects) { table(:projects) }
let(:project_settings) { table(:project_settings) } let(:project_settings) { table(:project_settings) }
let(:namespace) { table(:namespaces).create(name: 'user', path: 'user') } let(:namespace) { table(:namespaces).create(name: 'user', path: 'user') }
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::DigestColumn, :migration, schema: 20180913142237 do describe Gitlab::BackgroundMigration::DigestColumn, schema: 20180913142237 do
let(:personal_access_tokens) { table(:personal_access_tokens) } let(:personal_access_tokens) { table(:personal_access_tokens) }
let(:users) { table(:users) } let(:users) { table(:users) }
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::EncryptColumns, :migration, schema: 20180910115836 do describe Gitlab::BackgroundMigration::EncryptColumns, schema: 20180910115836 do
let(:model) { Gitlab::BackgroundMigration::Models::EncryptColumns::WebHook } let(:model) { Gitlab::BackgroundMigration::Models::EncryptColumns::WebHook }
let(:web_hooks) { table(:web_hooks) } let(:web_hooks) { table(:web_hooks) }
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::EncryptRunnersTokens, :migration, schema: 20181121111200 do describe Gitlab::BackgroundMigration::EncryptRunnersTokens, schema: 20181121111200 do
let(:settings) { table(:application_settings) } let(:settings) { table(:application_settings) }
let(:namespaces) { table(:namespaces) } let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) } let(:projects) { table(:projects) }
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::FixCrossProjectLabelLinks, :migration, schema: 20180702120647 do describe Gitlab::BackgroundMigration::FixCrossProjectLabelLinks, schema: 20180702120647 do
let(:namespaces_table) { table(:namespaces) } let(:namespaces_table) { table(:namespaces) }
let(:projects_table) { table(:projects) } let(:projects_table) { table(:projects) }
let(:issues_table) { table(:issues) } let(:issues_table) { table(:issues) }
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::FixProjectsWithoutProjectFeature, :migration, schema: 2020_01_27_111840 do describe Gitlab::BackgroundMigration::FixProjectsWithoutProjectFeature, schema: 2020_01_27_111840 do
let(:namespaces) { table(:namespaces) } let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) } let(:projects) { table(:projects) }
let(:project_features) { table(:project_features) } let(:project_features) { table(:project_features) }
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::FixPromotedEpicsDiscussionIds, :migration, schema: 20190715193142 do describe Gitlab::BackgroundMigration::FixPromotedEpicsDiscussionIds, schema: 20190715193142 do
let(:namespaces) { table(:namespaces) } let(:namespaces) { table(:namespaces) }
let(:users) { table(:users) } let(:users) { table(:users) }
let(:epics) { table(:epics) } let(:epics) { table(:epics) }
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::FixUserNamespaceNames, :migration, schema: 20190620112608 do describe Gitlab::BackgroundMigration::FixUserNamespaceNames, schema: 20190620112608 do
let(:namespaces) { table(:namespaces) } let(:namespaces) { table(:namespaces) }
let(:users) { table(:users) } let(:users) { table(:users) }
let(:user) { users.create(name: "The user's full name", projects_limit: 10, username: 'not-null', email: '1') } let(:user) { users.create(name: "The user's full name", projects_limit: 10, username: 'not-null', email: '1') }
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::FixUserProjectRouteNames, :migration, schema: 20190620112608 do describe Gitlab::BackgroundMigration::FixUserProjectRouteNames, schema: 20190620112608 do
let(:namespaces) { table(:namespaces) } let(:namespaces) { table(:namespaces) }
let(:users) { table(:users) } let(:users) { table(:users) }
let(:routes) { table(:routes) } let(:routes) { table(:routes) }
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
# rubocop: disable RSpec/FactoriesInMigrationSpecs # rubocop: disable RSpec/FactoriesInMigrationSpecs
describe Gitlab::BackgroundMigration::LegacyUploadMover do describe Gitlab::BackgroundMigration::LegacyUploadMover, schema: :latest do
let(:test_dir) { FileUploader.options['storage_path'] } let(:test_dir) { FileUploader.options['storage_path'] }
let(:filename) { 'image.png' } let(:filename) { 'image.png' }
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
# rubocop: disable RSpec/FactoriesInMigrationSpecs # rubocop: disable RSpec/FactoriesInMigrationSpecs
describe Gitlab::BackgroundMigration::LegacyUploadsMigrator do describe Gitlab::BackgroundMigration::LegacyUploadsMigrator, schema: :latest do
let(:test_dir) { FileUploader.options['storage_path'] } let(:test_dir) { FileUploader.options['storage_path'] }
let!(:hashed_project) { create(:project) } let!(:hashed_project) { create(:project) }
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::MergeRequestAssigneesMigrationProgressCheck do describe Gitlab::BackgroundMigration::MergeRequestAssigneesMigrationProgressCheck, schema: :latest do
context 'rescheduling' do context 'rescheduling' do
context 'when there are ongoing and no dead jobs' do context 'when there are ongoing and no dead jobs' do
it 'reschedules check' do it 'reschedules check' do
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::MigrateBuildStage, :migration, schema: 20180212101928 do describe Gitlab::BackgroundMigration::MigrateBuildStage, schema: 20180212101928 do
let(:projects) { table(:projects) } let(:projects) { table(:projects) }
let(:pipelines) { table(:ci_pipelines) } let(:pipelines) { table(:ci_pipelines) }
let(:stages) { table(:ci_stages) } let(:stages) { table(:ci_stages) }
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::MigrateFingerprintSha256WithinKeys, :migration, schema: 20200106071113 do describe Gitlab::BackgroundMigration::MigrateFingerprintSha256WithinKeys, schema: 20200106071113 do
subject(:fingerprint_migrator) { described_class.new } subject(:fingerprint_migrator) { described_class.new }
let(:key_table) { table(:keys) } let(:key_table) { table(:keys) }
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::MigrateIssueTrackersSensitiveData, :migration, schema: 20200130145430 do describe Gitlab::BackgroundMigration::MigrateIssueTrackersSensitiveData, schema: 20200130145430 do
let(:services) { table(:services) } let(:services) { table(:services) }
# we need to define the classes due to encryption # we need to define the classes due to encryption
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::MigrateLegacyArtifacts, :migration, schema: 20180816161409 do describe Gitlab::BackgroundMigration::MigrateLegacyArtifacts, schema: 20180816161409 do
let(:namespaces) { table(:namespaces) } let(:namespaces) { table(:namespaces) }
let(:projects) { table(:projects) } let(:projects) { table(:projects) }
let(:pipelines) { table(:ci_pipelines) } let(:pipelines) { table(:ci_pipelines) }
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::MigrateNullPrivateProfileToFalse, :migration, schema: 20190620105427 do describe Gitlab::BackgroundMigration::MigrateNullPrivateProfileToFalse, schema: 20190620105427 do
let(:users) { table(:users) } let(:users) { table(:users) }
it 'correctly migrates nil private_profile to false' do it 'correctly migrates nil private_profile to false' do
... ...
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Gitlab::BackgroundMigration::MigratePagesMetadata, :migration, schema: 20190919040324 do describe Gitlab::BackgroundMigration::MigratePagesMetadata, schema: 20190919040324 do
let(:projects) { table(:projects) } let(:projects) { table(:projects) }
subject(:migrate_pages_metadata) { described_class.new } subject(:migrate_pages_metadata) { described_class.new }
... ...
......