Commit d1eac99b authored by Rémy Coutable's avatar Rémy Coutable

Use the :migration metadata in migration specs

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 4af914c2
require 'spec_helper'
describe Gitlab::BackgroundMigration::PopulateUntrackedUploads, :sidekiq, :delete_no_cache do
# This migration is using UploadService, which sets uploads.secret that is only
# added to the DB schema in 20180129193323. Since the test isn't isolated, we
# just use the latest schema when testing this migration.
# Ideally, the test should not use factories nor UploadService, and rely on the
# `table` helper instead.
describe Gitlab::BackgroundMigration::PopulateUntrackedUploads, :sidekiq, :migration, schema: 20180129193323 do
include TrackUntrackedUploadsHelpers
subject { described_class.new }
......
......@@ -35,10 +35,6 @@ RSpec.configure do |config|
DatabaseCleaner.strategy = :deletion
end
config.before(:each, :delete_no_cache) do
DatabaseCleaner.strategy = :deletion, { cache_tables: false }
end
config.before(:each, :migration) do
DatabaseCleaner.strategy = :deletion, { cache_tables: false }
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment