Sha256: c3d70075707678fa6c9b74276928bd0e7e3f345bdea53a7f7f10b6cd0e1598a7

Contents?: true

Size: 1.13 KB

Versions: 13

Compression:

Stored size: 1.13 KB

Contents

require 'minitest_helper'

describe Oboe::Config do
  after do
    # Set back to always trace mode
    Oboe::Config[:tracing_mode] = "always"
    Oboe::Config[:sample_rate] = 1000000
  end

  it 'should have the correct default values' do
    # Reset Oboe::Config to defaults
    Oboe::Config.initialize

    Oboe::Config[:verbose].must_equal false
    Oboe::Config[:tracing_mode].must_equal "through"
    Oboe::Config[:reporter_host].must_equal "127.0.0.1"
  end

  it 'should have the correct instrumentation defaults' do
    # Reset Oboe::Config to defaults
    Oboe::Config.initialize

    instrumentation = [ :cassandra, :dalli, :nethttp, :memcached, :memcache, :mongo,
                        :moped, :rack, :resque, :action_controller, :action_view,
                        :active_record ]

    # Verify the number of individual instrumentations
    instrumentation.count.must_equal 12

    instrumentation.each do |k|
      Oboe::Config[k][:enabled].must_equal true
      Oboe::Config[k][:log_args].must_equal true
    end

    Oboe::Config[:resque][:link_workers].must_equal false
    Oboe::Config[:blacklist].is_a?(Array).must_equal true
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
oboe-2.7.0.3-java test/support/config_test.rb
oboe-2.7.0.3 test/support/config_test.rb
oboe-2.6.8 test/support/config_test.rb
oboe-2.6.7.1 test/support/config_test.rb
oboe-2.6.6.1 test/support/config_test.rb
oboe-2.6.5.5 test/support/config_test.rb
oboe-2.6.4.1 test/support/config_test.rb
oboe-2.6.3.0 test/support/config_test.rb
oboe-2.6.2.0 test/support/config_test.rb
oboe-2.6.1.0 test/support/config_test.rb
oboe-2.6.0.2 test/support/config_test.rb
oboe-2.5.0.7 test/support/config_test.rb
oboe-2.4.0.1 test/support/config_test.rb