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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-24 18:11:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-24 18:11:29 +0300
commitcb9b55e662d4164d913ef7031adc135d3ea4d9f0 (patch)
tree0da3d639eb5f981cc73f3c72648351e56fedd971 /spec/support/database_cleaner.rb
parentd5f67e75b6ef8ebc1b304589005ccd91ea6674ff (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/database_cleaner.rb')
-rw-r--r--spec/support/database_cleaner.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support/database_cleaner.rb b/spec/support/database_cleaner.rb
index 7bd1f0c5dfa..222cbe9feeb 100644
--- a/spec/support/database_cleaner.rb
+++ b/spec/support/database_cleaner.rb
@@ -22,4 +22,14 @@ RSpec.configure do |config|
self.class.use_transactional_tests = true
end
+
+ config.around(:each, :migration) do |example|
+ self.class.use_transactional_tests = false
+
+ example.run
+
+ delete_from_all_tables!(except: deletion_except_tables)
+
+ self.class.use_transactional_tests = true
+ end
end