Commit b7ee82b6 authored by Stan Hu's avatar Stan Hu Committed by Rémy Coutable

Disable caching of tables for migration spec that drops a temporary table

This is to fix job failures, such as https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/51409392.
parent f5cf3206
require 'spec_helper'
describe Gitlab::BackgroundMigration::PopulateUntrackedUploads, :sidekiq 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 }
......
......@@ -37,6 +37,10 @@ RSpec.configure do |config|
DatabaseCleaner.strategy = :deletion, { except: %w[licenses] }
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