summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-05-03 17:04:47 +0100
committerPhil Hughes <me@iamphill.com>2017-05-03 17:04:47 +0100
commitf29e5d4d93123ea73e5f58be46020781af2ef7cb (patch)
treed08a8f8e5a9cf30dd4f238c187673ffe30ac39b3 /spec/spec_helper.rb
parent4134d700623404948f163349882caf4a6d940cf3 (diff)
parent8f29bf96b9306fd95b9b98019e80173b47b3a6b8 (diff)
downloadgitlab-ce-f29e5d4d93123ea73e5f58be46020781af2ef7cb.tar.gz
Merge branch 'master' into deploy-keys-load-async
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index e67ad8f3455..e2d5928e5b2 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -13,8 +13,9 @@ rspec_profiling_is_configured =
ENV['RSPEC_PROFILING_POSTGRES_URL'] ||
ENV['RSPEC_PROFILING']
branch_can_be_profiled =
- ENV['CI_COMMIT_REF_NAME'] == 'master' ||
- ENV['CI_COMMIT_REF_NAME'] =~ /rspec-profile/
+ ENV['GITLAB_DATABASE'] == 'postgresql' &&
+ (ENV['CI_COMMIT_REF_NAME'] == 'master' ||
+ ENV['CI_COMMIT_REF_NAME'] =~ /rspec-profile/)
if rspec_profiling_is_configured && (!ENV.key?('CI') || branch_can_be_profiled)
require 'rspec_profiling/rspec'