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 'lib/tasks/gitlab/usage_data.rake')
-rw-r--r--lib/tasks/gitlab/usage_data.rake5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/tasks/gitlab/usage_data.rake b/lib/tasks/gitlab/usage_data.rake
index 159b70cd673..32db5e2dff6 100644
--- a/lib/tasks/gitlab/usage_data.rake
+++ b/lib/tasks/gitlab/usage_data.rake
@@ -51,9 +51,12 @@ namespace :gitlab do
desc 'GitLab | UsageDataMetrics | Generate raw SQL metrics queries for RSpec'
task generate_sql_metrics_queries: :environment do
+ require 'active_support/testing/time_helpers'
+ include ActiveSupport::Testing::TimeHelpers
+
path = Rails.root.join('tmp', 'test')
- queries = Timecop.freeze(2021, 1, 1) do
+ queries = travel_to(Time.utc(2021, 1, 1)) do
Gitlab::Usage::ServicePingReport.for(output: :metrics_queries)
end