Skip to content
Open
2 changes: 0 additions & 2 deletions instrumentation/http_client/.github-ci.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hannahramadan Is there another way to address this? It seems to me that breaking encapsulation for the purposes of testing is probably not the best way to validate this or increase coverage.

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
Loading