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/helpers/query_recorder.rb')
-rw-r--r--spec/support/helpers/query_recorder.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/helpers/query_recorder.rb b/spec/support/helpers/query_recorder.rb
index 5be9ba9ae1e..e8fa73a1b95 100644
--- a/spec/support/helpers/query_recorder.rb
+++ b/spec/support/helpers/query_recorder.rb
@@ -102,6 +102,10 @@ module ActiveRecord
@occurrences ||= @log.group_by(&:to_s).transform_values(&:count)
end
+ def occurrences_starting_with(str)
+ occurrences.select { |query, _count| query.starts_with?(str) }
+ end
+
def ignorable?(values)
return true if skip_schema_queries && values[:name]&.include?("SCHEMA")
return true if values[:name]&.match(/License Load/)