Skip to content

Commit 7420fb0

Browse files
committed
💄
1 parent e4c8a9a commit 7420fb0

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

fluent-plugin-logtail.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ require 'date'
33

44
Gem::Specification.new do |s|
55
s.name = 'fluent-plugin-logtail'
6-
s.version = '0.1.2'
6+
s.version = '0.2.1'
77
s.date = Date.today.to_s
88
s.summary = 'Logtail.com plugin for Fluentd'
99
s.description = 'Streams Fluentd logs to the Logtail.com logging service.'

spec/fluent/plugin/out_logtail_spec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
let(:cloud_config) do
1212
%{
1313
source_token abcd1234
14-
ingesting_host s1234.g1.betterstackdata.com
14+
ingesting_host s1234.eu-nbg-2.betterstackdata.com
1515
}
1616
end
1717

@@ -48,16 +48,16 @@ def format(tag, time, record)
4848
end
4949

5050
describe "#write" do
51-
it "should send a chunked request to the Logtail API" do
52-
stub = stub_request(:post, "https://s1234.g1.betterstackdata.com/").
51+
it "should send a chunked request to the Logtail API using default host" do
52+
stub = stub_request(:post, "https://in.logs.betterstack.com/").
5353
with(
5454
:body => start_with("\xDD\x00\x00\x00\x01\x85\xA3age\x1A\xAArequest_id\xA242\xA9parent_id\xA6parent\xAArouting_id\xA7routing\xA2dt\xB4".force_encoding("ASCII-8BIT")),
5555
:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Bearer abcd1234', 'Content-Type'=>'application/msgpack', 'User-Agent'=>'Logtail Fluentd/0.1.1'}
5656
).
5757
to_return(:status => 202, :body => "", :headers => {})
5858

59-
cloud_driver.emit(record)
60-
cloud_driver.run
59+
driver.emit(record)
60+
driver.run
6161

6262
expect(stub).to have_been_requested.times(1)
6363
end
@@ -83,15 +83,15 @@ def format(tag, time, record)
8383

8484
describe "#write to cloud" do
8585
it "should send a chunked request to the Logtail API" do
86-
stub = stub_request(:post, "https://in.logs.betterstack.com/").
86+
stub = stub_request(:post, "https://s1234.eu-nbg-2.betterstackdata.com/").
8787
with(
8888
:body => start_with("\xDD\x00\x00\x00\x01\x85\xA3age\x1A\xAArequest_id\xA242\xA9parent_id\xA6parent\xAArouting_id\xA7routing\xA2dt\xB4".force_encoding("ASCII-8BIT")),
8989
:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Bearer abcd1234', 'Content-Type'=>'application/msgpack', 'User-Agent'=>'Logtail Fluentd/0.1.1'}
9090
).
9191
to_return(:status => 202, :body => "", :headers => {})
9292

93-
driver.emit(record)
94-
driver.run
93+
cloud_driver.emit(record)
94+
cloud_driver.run
9595

9696
expect(stub).to have_been_requested.times(1)
9797
end

0 commit comments

Comments
 (0)