Sha256: e822f45bf2bbe781f499bdda60754b6e8646fbcafae5152aba713ab56c015b41

Contents?: true

Size: 1.54 KB

Versions: 25

Compression:

Stored size: 1.54 KB

Contents

# (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2016

ENV['INSTANA_TEST'] = 'true'

begin
  require 'simplecov'
  require 'simplecov_json_formatter'

  SimpleCov.start do
    enable_coverage :branch

    add_filter %r{^/test/}

    add_group(
      'In Process Collector',
      [%r{lib/instana/(agent|backend|tracing|collectors|open_tracing|snapshot)}, %r{lib/instana/[^/]+\.rb}]
    )

    if ENV['APPRAISAL_INITIALIZED']
      add_group(
        'Instrumentation',
        %r{lib/instana/(activators|frameworks|instrumentation)}
      )
    else
      add_filter %r{lib/instana/(activators|frameworks|instrumentation)}
    end

    if ENV['CI']
      formatter SimpleCov::Formatter::JSONFormatter
    end
  end
rescue LoadError => _e
  nil
end

require 'bundler/setup'
Bundler.require

require "minitest/spec"
require "minitest/autorun"
require "minitest/reporters"
require 'fakefs/safe'

require 'webmock/minitest'
# Webmock: Whitelist local IPs
WebMock.disable_net_connect!(
  allow: ->(uri) { %w[localhost 127.0.0.1 172.17.0.1 172.0.12.100].include?(uri.host) && ENV.key?('APPRAISAL_INITIALIZED') }
)

Dir['test/support/*.rb'].each { |f| load(f) }

if ENV['CI']
  Minitest::Reporters.use!([
                             Minitest::Reporters::JUnitReporter.new('_junit', false),
                             Minitest::Reporters::SpecReporter.new
                           ])
else
  Minitest::Reporters.use!([
                             MiniTest::Reporters::SpecReporter.new
                           ])
end
Minitest::Test.include(Instana::TestHelpers)

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
instana-1.210.1 test/test_helper.rb
instana-1.210.0 test/test_helper.rb
instana-1.209.8 test/test_helper.rb
instana-1.209.7 test/test_helper.rb
instana-1.209.6 test/test_helper.rb
instana-1.209.5 test/test_helper.rb
instana-1.209.4 test/test_helper.rb
instana-1.209.3 test/test_helper.rb
instana-1.209.2 test/test_helper.rb
instana-1.209.1 test/test_helper.rb
instana-1.209.0.pre3 test/test_helper.rb
instana-1.209.0.pre2 test/test_helper.rb
instana-1.209.0.pre1 test/test_helper.rb
instana-1.208.0 test/test_helper.rb
instana-1.207.0 test/test_helper.rb
instana-1.206.0 test/test_helper.rb
instana-1.205.0 test/test_helper.rb
instana-1.204.0 test/test_helper.rb
instana-1.204.0.pre3 test/test_helper.rb
instana-1.204.0.pre2 test/test_helper.rb