19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/gitlab_quality/test_tooling/test_metrics_exporter/config_helper.rb', line 19
def configure!(run_type = test_run_type)
return unless ENV.fetch("CI", nil) && ENV.fetch("GLCI_EXPORT_TEST_METRICS", "true") == "true" && run_type
RSpec.configure do |rspec_config|
next if rspec_config.dry_run?
Config.configure do |exporter_config|
self.logger = exporter_config.logger
next warn_missing_observer_variables unless observer_env_vars_present?
yield(exporter_config) if block_given?
configure_exporter!(exporter_config, run_type)
rspec_config.add_formatter Formatter
logger.info("Test metrics export is enabled for run type: #{run_type}")
end
end
end
|