Skip to content

Commit 7817f64

Browse files
committed
change port
1 parent cf1c1b9 commit 7817f64

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

test/fluent/plugin/test_in_otlp.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def config
1111
tag otlp.test
1212
<http>
1313
bind 127.0.0.1
14-
port 4318
14+
port 14318
1515
</http>
1616
CONFIG
1717
end
@@ -38,7 +38,7 @@ def test_configure
3838
d = create_driver
3939
assert_equal "otlp.test", d.instance.tag
4040
assert_equal "127.0.0.1", d.instance.http_config.bind
41-
assert_equal 4318, d.instance.http_config.port
41+
assert_equal 14318, d.instance.http_config.port
4242
end
4343

4444
data("metrics" => {
@@ -163,7 +163,7 @@ def config
163163
tag otlp.test
164164
<http>
165165
bind 127.0.0.1
166-
port 4318
166+
port 14318
167167
</http>
168168
<transport tls>
169169
ca_path "#{File.expand_path(File.dirname(__FILE__) + '/../resources/certs/ca.crt')}"
@@ -205,7 +205,7 @@ def compress(data)
205205

206206
def post_https_json(path, json, headers: {})
207207
headers = headers.merge({ "Content-Type" => "application/json" })
208-
post(path, json, endpoint: "https://127.0.0.1:4318", headers: headers, options: https_option)
208+
post(path, json, endpoint: "https://127.0.0.1:14318", headers: headers, options: https_option)
209209
end
210210

211211
def post_json(path, json, headers: {}, options: {})
@@ -215,15 +215,15 @@ def post_json(path, json, headers: {}, options: {})
215215

216216
def post_https_protobuf(path, binary, headers: {}, options: {})
217217
headers = headers.merge({ "Content-Type" => "application/x-protobuf" })
218-
post(path, binary, endpoint: "https://127.0.0.1:4318", headers: headers, options: options)
218+
post(path, binary, endpoint: "https://127.0.0.1:14318", headers: headers, options: options)
219219
end
220220

221221
def post_protobuf(path, binary, headers: {}, options: {})
222222
headers = headers.merge({ "Content-Type" => "application/x-protobuf" })
223223
post(path, binary, headers: headers, options: options)
224224
end
225225

226-
def post(path, body, endpoint: "http://127.0.0.1:4318", headers: {}, options: {})
226+
def post(path, body, endpoint: "http://127.0.0.1:14318", headers: {}, options: {})
227227
connection = Excon.new("#{endpoint}#{path}", body: body, headers: headers, **options)
228228
connection.post
229229
end

test/fluent/plugin/test_out_otlp.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ class Fluent::Plugin::OtlpOutputTest < Test::Unit::TestCase
1616
def config
1717
<<~CONFIG
1818
<http>
19-
endpoint "http://127.0.0.1:4318"
19+
endpoint "http://127.0.0.1:14318"
2020
</http>
2121
CONFIG
2222
end
2323

2424
def server_config
25-
config = { BindAddress: "127.0.0.1", Port: "4318" }
25+
config = { BindAddress: "127.0.0.1", Port: "14318" }
2626
# Suppress webrick logs
2727
config[:Logger] = DEFAULT_LOGGER
2828
config[:AccessLog] = []
@@ -83,7 +83,7 @@ def create_driver(conf = config)
8383

8484
def test_configure
8585
d = create_driver
86-
assert_equal "http://127.0.0.1:4318", d.instance.http_config.endpoint
86+
assert_equal "http://127.0.0.1:14318", d.instance.http_config.endpoint
8787
end
8888

8989
def test_send_logs
@@ -152,7 +152,7 @@ def test_unrecoverable_error
152152
d.feed(event)
153153
end
154154

155-
assert_match(%r{got unrecoverable error response from 'http://127.0.0.1:4318/v1/logs', response code is 500},
155+
assert_match(%r{got unrecoverable error response from 'http://127.0.0.1:14318/v1/logs', response code is 500},
156156
d.instance.log.out.logs.join)
157157

158158
d.instance_shutdown
@@ -164,15 +164,15 @@ def test_error_with_disabled_unrecoverable
164164

165165
d = create_driver(%[
166166
<http>
167-
endpoint "http://127.0.0.1:4318"
167+
endpoint "http://127.0.0.1:14318"
168168
error_response_as_unrecoverable false
169169
</http>
170170
])
171171
d.run(default_tag: "otlp.test", shutdown: false) do
172172
d.feed(event)
173173
end
174174

175-
assert_match(%r{got error response from 'http://127.0.0.1:4318/v1/logs', response code is 500},
175+
assert_match(%r{got error response from 'http://127.0.0.1:14318/v1/logs', response code is 500},
176176
d.instance.log.out.logs.join)
177177

178178
d.instance_shutdown
@@ -187,7 +187,7 @@ def test_write_with_retryable_response
187187

188188
d = create_driver(%[
189189
<http>
190-
endpoint "http://127.0.0.1:4318"
190+
endpoint "http://127.0.0.1:14318"
191191
retryable_response_codes [503]
192192
</http>
193193
])

0 commit comments

Comments
 (0)