Sha256: c8d0edaafb5e22a8a5f945e10bb0f75fecdaf338f281ac3097891f8c8eeeb957

Contents?: true

Size: 1.23 KB

Versions: 3

Compression:

Stored size: 1.23 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[:sample_source].must_equal 2
    Oboe::Config[:sample_rate].must_equal 300000
    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

3 entries across 3 versions & 1 rubygems

Version Path
oboe-2.3.4.1 test/support/config_test.rb
oboe-2.3.3.7 test/support/config_test.rb
oboe-2.3.2 test/support/config_test.rb