From 3ee1b46b09cb574160f6f79e8f3ce93ce68a043b Mon Sep 17 00:00:00 2001 From: Pedro Furtado Date: Thu, 5 Dec 2024 07:50:00 -0300 Subject: [PATCH] feat: add test --- sdk/test/opentelemetry/sdk_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sdk/test/opentelemetry/sdk_test.rb b/sdk/test/opentelemetry/sdk_test.rb index f0ad46121..31e20bc9e 100644 --- a/sdk/test/opentelemetry/sdk_test.rb +++ b/sdk/test/opentelemetry/sdk_test.rb @@ -27,4 +27,13 @@ _(received_message).must_match(/unexpected configuration error due to unknown keyword: .*invalid_option/) end end + + describe '#configure (sdk disabled)' do + it 'ignore configuration when sdk is disabled by env' do + config = OpenTelemetry::TestHelpers.with_env('OTEL_SDK_DISABLED' => 'true') do + OpenTelemetry::SDK.configure + end + _(config).must_equal nil + end + end end