summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb3
-rw-r--r--spec/lib/gitlab/background_migration/prepare_untracked_uploads_spec.rb2
2 files changed, 5 insertions, 0 deletions
diff --git a/spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb b/spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb
index 9c1261881df..b80df6956b0 100644
--- a/spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb
+++ b/spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb
@@ -9,7 +9,10 @@ describe Gitlab::BackgroundMigration::PopulateUntrackedUploads, :sidekiq do
let!(:uploads) { described_class::Upload }
before do
+ DatabaseCleaner.clean
+ drop_temp_table_if_exists
ensure_temporary_tracking_table_exists
+ uploads.delete_all
end
after(:all) do
diff --git a/spec/lib/gitlab/background_migration/prepare_untracked_uploads_spec.rb b/spec/lib/gitlab/background_migration/prepare_untracked_uploads_spec.rb
index dfe37e43751..cd3f1a45270 100644
--- a/spec/lib/gitlab/background_migration/prepare_untracked_uploads_spec.rb
+++ b/spec/lib/gitlab/background_migration/prepare_untracked_uploads_spec.rb
@@ -18,6 +18,8 @@ describe Gitlab::BackgroundMigration::PrepareUntrackedUploads, :sidekiq do
end
before do
+ DatabaseCleaner.clean
+
drop_temp_table_if_exists
end