diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-03-27 16:31:05 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-03-27 16:31:05 +0300 |
commit | e248ec660e0b61bd3ed29bce4fe02af1110acc59 (patch) | |
tree | 33185a1608b3ebbbd7608ece9c97dba4ceaf5601 | |
parent | 40e3a70165a97526edc0caee228bc7b75f62534c (diff) | |
parent | e0e208abae3aacb4a8ad7fa8fdf8d8dd4ea14c4c (diff) |
Merge branch '29787-monitor-ee-rspec-tests-separately' into 'master'
Resolve "Consider tracking the EE test suite with `rspec_profiling`"
Closes #29787
See merge request !10226
-rw-r--r-- | config/initializers/rspec_profiling.rb | 6 | ||||
-rw-r--r-- | spec/spec_helper.rb | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/config/initializers/rspec_profiling.rb b/config/initializers/rspec_profiling.rb index 70177995356..764c067c6f0 100644 --- a/config/initializers/rspec_profiling.rb +++ b/config/initializers/rspec_profiling.rb @@ -7,7 +7,11 @@ module RspecProfilingExt module Git def branch - ENV['CI_COMMIT_REF_NAME'] || super + if ENV['CI_COMMIT_REF_NAME'] + "#{defined?(Gitlab::License) ? 'ee' : 'ce'}:#{ENV['CI_COMMIT_REF_NAME']}" + else + super + end end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 5ab8f0d981a..4eb5b150af5 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -9,7 +9,8 @@ require 'rspec/rails' require 'shoulda/matchers' require 'rspec/retry' -if ENV['RSPEC_PROFILING_POSTGRES_URL'] || ENV['RSPEC_PROFILING'] +if (ENV['RSPEC_PROFILING_POSTGRES_URL'] || ENV['RSPEC_PROFILING']) && + (!ENV.has_key?('CI') || ENV['CI_COMMIT_REF_NAME'] == 'master') require 'rspec_profiling/rspec' end |