Skip to content

Commit

Permalink
test: Remove config option tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kaylareopelle committed Sep 17, 2024
1 parent e5cc573 commit ea3351e
Showing 1 changed file with 0 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,46 +36,6 @@
assert_equal(OpenTelemetry::Instrumentation::Logger::VERSION, log_record.instrumentation_scope.version)
end

describe 'configuration options' do
describe 'when a user configures name' do
let(:config) { { name: 'custom_logger' } }

it 'updates the logger name' do
ruby_logger.debug(msg)
assert_equal('custom_logger', log_record.instrumentation_scope.name)
end

it 'uses the default version' do
ruby_logger.debug(msg)
assert_equal(OpenTelemetry::Instrumentation::Logger::VERSION, log_record.instrumentation_scope.version)
end
end

describe 'when a user configures version' do
let(:config) { { version: '5000' } }

it 'updates the logger version' do
ruby_logger.debug(msg)
assert_equal('5000', log_record.instrumentation_scope.version)
end

it 'uses the default name' do
ruby_logger.debug(msg)
assert_equal(OpenTelemetry::Instrumentation::Logger::NAME, log_record.instrumentation_scope.name)
end
end

describe 'when a user configures both name and version' do
let(:config) { { name: 'custom_logger', version: '5000' } }

it 'updates both values' do
ruby_logger.debug(msg)
assert_equal('custom_logger', log_record.instrumentation_scope.name)
assert_equal('5000', log_record.instrumentation_scope.version)
end
end
end

it 'sets log record attributes based on the Ruby log' do
timestamp = Time.now
Time.stub(:now, timestamp) do
Expand Down

0 comments on commit ea3351e

Please sign in to comment.