Skip to content

Commit ec741ad

Browse files
committed
Removed problematic test
1 parent 4f59efa commit ec741ad

File tree

3 files changed

+1
-34
lines changed

3 files changed

+1
-34
lines changed

.github/workflows/main.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,9 @@ jobs:
2828
- name: Build plugin
2929
run: bundle exec rake build
3030

31-
- run: id
32-
- run: sudo id
33-
- run: ls -dl /usr/lib /usr/lib/ssl /usr/lib/ssl/cert.pem
34-
3531
- name: Run tests
3632
run: bundle exec rake test
3733

38-
- run: ls -l /tmp
39-
4034
- name: Capture version
4135
run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
4236

lib/fluent/plugin/out_scalyr.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,7 @@ def write(chunk)
209209
$log.warn e.message
210210
$log.warn "Discarding buffer chunk without retrying or logging to <secondary>"
211211
rescue Scalyr::Client4xxError => e
212-
x = Net::HTTP.new("google.com", 443)
213-
x.use_ssl = true
214-
$log.warn "#{x.ca_file} #{x.ca_path} 4XX status code received for request #{index + 1}/#{requests.size}. Discarding buffer without retrying or logging.\n\t#{response.code} - #{e.message}\n\tChunk Size: #{chunk.size}\n\tLog messages this request: #{request[:record_count]}\n\tJSON payload size: #{request[:body].bytesize}\n\tSample: #{request[:body][0, 1024]}..."
212+
$log.warn "4XX status code received for request #{index + 1}/#{requests.size}. Discarding buffer without retrying or logging.\n\t#{response.code} - #{e.message}\n\tChunk Size: #{chunk.size}\n\tLog messages this request: #{request[:record_count]}\n\tJSON payload size: #{request[:body].bytesize}\n\tSample: #{request[:body][0, 1024]}..."
215213
end
216214
}
217215
rescue JSON::GeneratorError

test/test_ssl_verify.rb

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -66,31 +66,6 @@ def test_bad_ssl_certificates
6666
end
6767
end
6868

69-
def test_bad_system_ssl_certificates
70-
# `sudo mv #{OpenSSL::X509::DEFAULT_CERT_FILE} /tmp/system_cert.pem`
71-
# `sudo mv #{OpenSSL::X509::DEFAULT_CERT_DIR} /tmp/system_certs`
72-
73-
# begin
74-
d = create_driver %(
75-
api_write_token test_token
76-
ssl_ca_bundle_path '/non/existent'
77-
)
78-
79-
d.run(default_tag: "test") do
80-
time = event_time("2015-04-01 10:00:00 UTC")
81-
d.feed(time, {"a" => 1})
82-
83-
logger = flexmock($log)
84-
logger.should_receive(:warn).once.with(/certificate verification failed/i)
85-
logger.should_receive(:warn).once.with(/certificate verify failed/i)
86-
logger.should_receive(:warn).once.with(/discarding buffer/i)
87-
end
88-
# ensure
89-
# `sudo mv /tmp/system_certs #{OpenSSL::X509::DEFAULT_CERT_DIR}`
90-
# `sudo mv /tmp/system_cert.pem #{OpenSSL::X509::DEFAULT_CERT_FILE}`
91-
# end
92-
end
93-
9469
def test_hostname_verification
9570
agent_scalyr_com_ip = `dig +short agent.scalyr.com 2> /dev/null | tail -n 1 | tr -d "\n"`
9671
if agent_scalyr_com_ip.empty?

0 commit comments

Comments
 (0)