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:
Diffstat (limited to 'spec/support/database_cleaner.rb')
-rw-r--r--spec/support/database_cleaner.rb23
1 files changed, 0 insertions, 23 deletions
diff --git a/spec/support/database_cleaner.rb b/spec/support/database_cleaner.rb
index f8ddf3e66a5..7bd1f0c5dfa 100644
--- a/spec/support/database_cleaner.rb
+++ b/spec/support/database_cleaner.rb
@@ -13,19 +13,6 @@ RSpec.configure do |config|
DatabaseCleaner.clean_with(:deletion)
end
- config.append_after(:context, :migration) do
- delete_from_all_tables!(except: ['work_item_types'])
-
- # Postgres maximum number of columns in a table is 1600 (https://github.com/postgres/postgres/blob/de41869b64d57160f58852eab20a27f248188135/src/include/access/htup_details.h#L23-L47).
- # We drop and recreate the database if any table has more than 1200 columns, just to be safe.
- if any_connection_class_with_more_than_allowed_columns?
- recreate_all_databases!
-
- # Seed required data as recreating DBs will delete it
- TestEnv.seed_db
- end
- end
-
config.around(:each, :delete) do |example|
self.class.use_transactional_tests = false
@@ -35,14 +22,4 @@ 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: ['work_item_types'])
-
- self.class.use_transactional_tests = true
- end
end