summaryrefslogtreecommitdiff
path: root/db/fixtures
diff options
context:
space:
mode:
authorNikolayS <nsamokhvalov@gitlab.com>2018-09-30 17:06:45 -0700
committerNikolayS <nsamokhvalov@gitlab.com>2018-09-30 17:06:45 -0700
commit2816d4bc2aad0af78767091b99f3d9d5b61c32c5 (patch)
tree463b9fad81e1d110b0c945d6c0bd5852eae5d94f /db/fixtures
parent29cc3d796f415fad8c2c21bdb39f5f9e36024f47 (diff)
parent2155ba8b402391d17426dae531d5d85f3f433d2a (diff)
downloadgitlab-ce-2816d4bc2aad0af78767091b99f3d9d5b61c32c5.tar.gz
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into nik/cleanup_redundant_indexes
Diffstat (limited to 'db/fixtures')
-rw-r--r--db/fixtures/development/17_cycle_analytics.rb14
-rw-r--r--db/fixtures/development/99_common_metrics.rb5
-rw-r--r--db/fixtures/production/999_common_metrics.rb5
3 files changed, 10 insertions, 14 deletions
diff --git a/db/fixtures/development/17_cycle_analytics.rb b/db/fixtures/development/17_cycle_analytics.rb
index 7b9a4bad449..285436f4324 100644
--- a/db/fixtures/development/17_cycle_analytics.rb
+++ b/db/fixtures/development/17_cycle_analytics.rb
@@ -6,20 +6,6 @@ class Gitlab::Seeder::CycleAnalytics
@project = project
@user = User.admins.first
@issue_count = perf ? 1000 : 5
- stub_git_pre_receive!
- end
-
- # The GitLab API needn't be running for the fixtures to be
- # created. Since we're performing a number of git actions
- # here (like creating a branch or committing a file), we need
- # to disable the `pre_receive` hook in order to remove this
- # dependency on the GitLab API.
- def stub_git_pre_receive!
- Gitlab::Git::HooksService.class_eval do
- def run_hook(name)
- [true, '']
- end
- end
end
def seed_metrics!
diff --git a/db/fixtures/development/99_common_metrics.rb b/db/fixtures/development/99_common_metrics.rb
new file mode 100644
index 00000000000..1f39c0ce5a0
--- /dev/null
+++ b/db/fixtures/development/99_common_metrics.rb
@@ -0,0 +1,5 @@
+# frozen_string_literal: true
+
+require Rails.root.join('db/importers/common_metrics_importer.rb')
+
+::Importers::CommonMetricsImporter.new.execute
diff --git a/db/fixtures/production/999_common_metrics.rb b/db/fixtures/production/999_common_metrics.rb
new file mode 100644
index 00000000000..1f39c0ce5a0
--- /dev/null
+++ b/db/fixtures/production/999_common_metrics.rb
@@ -0,0 +1,5 @@
+# frozen_string_literal: true
+
+require Rails.root.join('db/importers/common_metrics_importer.rb')
+
+::Importers::CommonMetricsImporter.new.execute