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-12-14 06:07:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-14 06:07:29 +0300
commit1103945ed4f3e430b8029b4a7893e214dfe289fb (patch)
tree5bd67830842c9d8f964a09f3a601581efdb0c358 /spec/support/database
parentdbfcd56fcbb4e148920094ab004ed175468911c3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/database')
-rw-r--r--spec/support/database/query_recorder.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/database/query_recorder.rb b/spec/support/database/query_recorder.rb
index 3480430a0da..c0736221af3 100644
--- a/spec/support/database/query_recorder.rb
+++ b/spec/support/database/query_recorder.rb
@@ -5,5 +5,13 @@ RSpec.configure do |config|
config.before(:suite) do
log_file = Rails.root.join(Gitlab::Database::QueryAnalyzers::QueryRecorder.log_file)
File.write(log_file, '') if File.exist?(log_file)
+ File.delete("#{log_file}.gz") if File.exist?("#{log_file}.gz")
+ end
+
+ config.after(:suite) do
+ if ENV['CI']
+ log_file = Rails.root.join(Gitlab::Database::QueryAnalyzers::QueryRecorder.log_file)
+ system("gzip #{log_file}") if File.exist?(log_file)
+ end
end
end