diff --git a/instrumentation/http_client/.github-ci.yml b/instrumentation/http_client/.github-ci.yml deleted file mode 100644 index fe13d309cc..0000000000 --- a/instrumentation/http_client/.github-ci.yml +++ /dev/null @@ -1,2 +0,0 @@ -env: - minimum_coverage: 62 diff --git a/instrumentation/http_client/test/instrumentation/http_client/instrumentation_test.rb b/instrumentation/http_client/test/instrumentation/http_client/instrumentation_test.rb index 33f982dca0..c3c65bb917 100644 --- a/instrumentation/http_client/test/instrumentation/http_client/instrumentation_test.rb +++ b/instrumentation/http_client/test/instrumentation/http_client/instrumentation_test.rb @@ -11,8 +11,6 @@ describe OpenTelemetry::Instrumentation::HttpClient do let(:instrumentation) { OpenTelemetry::Instrumentation::HttpClient::Instrumentation.instance } - before { skip unless ENV['BUNDLE_GEMFILE'].include?('stable') } - it 'has #name' do _(instrumentation.name).must_equal 'OpenTelemetry::Instrumentation::HttpClient' end @@ -22,9 +20,23 @@ _(instrumentation.version).wont_be_empty end - describe '#install' do - it 'accepts argument' do - instrumentation.install({}) + describe 'determine_semconv' do + it 'returns "dup" when OTEL_SEMCONV_STABILITY_OPT_IN includes http/dup' do + OpenTelemetry::TestHelpers.with_env('OTEL_SEMCONV_STABILITY_OPT_IN' => 'http/dup') do + _(instrumentation.send(:determine_semconv)).must_equal('dup') + end + end + + it 'returns "old" when OTEL_SEMCONV_STABILITY_OPT_IN is old' do + OpenTelemetry::TestHelpers.with_env('OTEL_SEMCONV_STABILITY_OPT_IN' => 'old') do + _(instrumentation.send(:determine_semconv)).must_equal('old') + end + end + + it 'returns "stable" when OTEL_SEMCONV_STABILITY_OPT_IN is empty' do + OpenTelemetry::TestHelpers.with_env('OTEL_SEMCONV_STABILITY_OPT_IN' => '') do + _(instrumentation.send(:determine_semconv)).must_equal('stable') + end end end end