Skip to content

Commit

Permalink
test: Remove verify_peer helper
Browse files Browse the repository at this point in the history
  • Loading branch information
kaylareopelle committed Sep 12, 2024
1 parent a7280ab commit b2a3764
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@
'OTEL_EXPORTER_OTLP_COMPRESSION' => 'gzip',
'OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_NONE' => 'true',
'OTEL_EXPORTER_OTLP_TIMEOUT' => '11') do

remove_verify_peer_if_present
OpenTelemetry::Exporter::OTLP::LogsExporter.new
end
_(exp.instance_variable_get(:@headers)).must_equal('a' => 'b', 'c' => 'd', 'User-Agent' => DEFAULT_USER_AGENT)
Expand Down Expand Up @@ -313,7 +311,7 @@
describe 'ssl_verify_mode:' do
it 'can be set to VERIFY_NONE by an envvar' do
exp = OpenTelemetry::TestHelpers.with_env('OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_NONE' => 'true') do
remove_verify_peer_if_present
binding.irb
OpenTelemetry::Exporter::OTLP::LogsExporter.new
end
http = exp.instance_variable_get(:@http)
Expand Down
6 changes: 0 additions & 6 deletions exporter/otlp-logs/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,3 @@
require 'webmock/minitest'

OpenTelemetry.logger = Logger.new(File::NULL)

def remove_verify_peer_if_present
# The verify peer env var is checked first. if it is defined, verify none will never be set
# due to test order, sometimes it is defined in the ENV, so ensure it is not there
ENV.delete('OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_PEER') if ENV.key?('OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_PEER')
end

0 comments on commit b2a3764

Please sign in to comment.