fluent-plugin-syslog_rfc5424 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97f2d3ab3564ea17b41de5f29a92beb3c9fb8221
|
4
|
+
data.tar.gz: 664e456482c38936b853c46fbcb460c5d7a3b545
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54bbfea77fc122602fb4e085e852614aeb6c25f336e695c58ad9fd00ba0a9351c7cd97db72dedcb28b40a019ed067a17bbc6b848179930a698436081b682fb2b
|
7
|
+
data.tar.gz: 6fc29feff0b24eb09696c3034ae2454372823d9aecd9c972a6b44e3b5972edd933cc84a225b2c33d579f99a03c91513c4d51a34f83a0c70c3f73e6b344590e64
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "fluent-plugin-syslog_rfc5424"
|
7
|
-
spec.version = "0.3.
|
7
|
+
spec.version = "0.3.1"
|
8
8
|
spec.authors = ["Pivotal"]
|
9
9
|
spec.email = %w(cf-loggregator@pivotal.io)
|
10
10
|
spec.homepage = "https://github.com/cloudfoundry/fluent-plugin-syslog_rfc5424"
|
@@ -43,7 +43,13 @@ module Fluent
|
|
43
43
|
socket = find_socket(transport, host, port)
|
44
44
|
return socket if socket
|
45
45
|
|
46
|
-
@sockets[socket_key(transport, host, port)] =
|
46
|
+
@sockets[socket_key(transport, host, port)] = socket_create(transport.to_sym, host, port, socket_options)
|
47
|
+
end
|
48
|
+
|
49
|
+
def socket_options
|
50
|
+
return {} unless @transport == 'tls'
|
51
|
+
|
52
|
+
{ insecure: @insecure, verify_fqdn: !@insecure }
|
47
53
|
end
|
48
54
|
|
49
55
|
def socket_key(transport, host, port)
|
@@ -35,7 +35,7 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
|
|
35
35
|
stub(socket).close
|
36
36
|
|
37
37
|
any_instance_of(Fluent::Plugin::OutSyslogRFC5424) do |fluent_plugin|
|
38
|
-
mock(fluent_plugin).socket_create(:tls, "example.com", 123, {:insecure=>false}).returns(socket)
|
38
|
+
mock(fluent_plugin).socket_create(:tls, "example.com", 123, {:insecure=>false, :verify_fqdn=>true}).returns(socket)
|
39
39
|
end
|
40
40
|
|
41
41
|
output_driver.run do
|
@@ -56,7 +56,7 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
|
|
56
56
|
stub(socket).close
|
57
57
|
|
58
58
|
any_instance_of(Fluent::Plugin::OutSyslogRFC5424) do |fluent_plugin|
|
59
|
-
mock(fluent_plugin).socket_create(:tcp, "example.com", 123, {
|
59
|
+
mock(fluent_plugin).socket_create(:tcp, "example.com", 123, {}).returns(socket)
|
60
60
|
end
|
61
61
|
|
62
62
|
output_driver.run do
|
@@ -69,7 +69,7 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
|
|
69
69
|
@type syslog_rfc5424
|
70
70
|
host example.com
|
71
71
|
port 123
|
72
|
-
transport
|
72
|
+
transport tls
|
73
73
|
insecure true
|
74
74
|
)
|
75
75
|
|
@@ -78,7 +78,7 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
|
|
78
78
|
stub(socket).close
|
79
79
|
|
80
80
|
any_instance_of(Fluent::Plugin::OutSyslogRFC5424) do |fluent_plugin|
|
81
|
-
mock(fluent_plugin).socket_create(:
|
81
|
+
mock(fluent_plugin).socket_create(:tls, "example.com", 123, {:insecure=>true, :verify_fqdn=>false}).returns(socket)
|
82
82
|
end
|
83
83
|
|
84
84
|
output_driver.run do
|
@@ -97,7 +97,7 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
|
|
97
97
|
stub(socket).puts(@formatted_log)
|
98
98
|
|
99
99
|
any_instance_of(Fluent::Plugin::OutSyslogRFC5424) do |fluent_plugin|
|
100
|
-
mock(fluent_plugin).socket_create(:tls, "example.com", 123, {:insecure=>false}).returns(socket)
|
100
|
+
mock(fluent_plugin).socket_create(:tls, "example.com", 123, {:insecure=>false, :verify_fqdn=>true}).returns(socket)
|
101
101
|
end
|
102
102
|
|
103
103
|
mock(socket).close
|