fluentd 1.13.0-x86-mingw32 → 1.13.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fluentd might be problematic. Click here for more details.

@@ -6,17 +6,24 @@ require 'socket'
6
6
  require 'openssl'
7
7
 
8
8
  class SocketHelperTest < Test::Unit::TestCase
9
- PORT = unused_port
10
9
  CERT_DIR = File.expand_path(File.dirname(__FILE__) + '/data/cert/without_ca')
11
10
  CA_CERT_DIR = File.expand_path(File.dirname(__FILE__) + '/data/cert/with_ca')
12
11
  CERT_CHAINS_DIR = File.expand_path(File.dirname(__FILE__) + '/data/cert/cert_chains')
13
12
 
13
+ def setup
14
+ @port = unused_port
15
+ end
16
+
17
+ def teardown
18
+ @port = nil
19
+ end
20
+
14
21
  class SocketHelperTestPlugin < Fluent::Plugin::TestBase
15
22
  helpers :socket
16
23
  end
17
24
 
18
25
  class EchoTLSServer
19
- def initialize(host = '127.0.0.1', port = PORT, cert_path: nil, private_key_path: nil, ca_path: nil)
26
+ def initialize(port, host: '127.0.0.1', cert_path: nil, private_key_path: nil, ca_path: nil)
20
27
  server = TCPServer.open(host, port)
21
28
  ctx = OpenSSL::SSL::SSLContext.new
22
29
  ctx.cert = OpenSSL::X509::Certificate.new(File.open(cert_path)) if cert_path
@@ -91,8 +98,8 @@ class SocketHelperTest < Test::Unit::TestCase
91
98
  cert_path = File.join(CERT_DIR, 'cert.pem')
92
99
  private_key_path = File.join(CERT_DIR, 'cert-key.pem')
93
100
 
94
- EchoTLSServer.new(cert_path: cert_path, private_key_path: private_key_path).start do
95
- client = SocketHelperTestPlugin.new.socket_create_tls('127.0.0.1', PORT, verify_fqdn: false, cert_paths: [cert_path])
101
+ EchoTLSServer.new(@port, cert_path: cert_path, private_key_path: private_key_path).start do
102
+ client = SocketHelperTestPlugin.new.socket_create_tls('127.0.0.1', @port, verify_fqdn: false, cert_paths: [cert_path])
96
103
  client.write('hello')
97
104
  assert_equal 'hello', client.readpartial(100)
98
105
  client.close
@@ -105,8 +112,8 @@ class SocketHelperTest < Test::Unit::TestCase
105
112
 
106
113
  ca_cert_path = File.join(CA_CERT_DIR, 'ca-cert.pem')
107
114
 
108
- EchoTLSServer.new(cert_path: cert_path, private_key_path: private_key_path).start do
109
- client = SocketHelperTestPlugin.new.socket_create_tls('127.0.0.1', PORT, verify_fqdn: false, cert_paths: [ca_cert_path])
115
+ EchoTLSServer.new(@port, cert_path: cert_path, private_key_path: private_key_path).start do
116
+ client = SocketHelperTestPlugin.new.socket_create_tls('127.0.0.1', @port, verify_fqdn: false, cert_paths: [ca_cert_path])
110
117
  client.write('hello')
111
118
  assert_equal 'hello', client.readpartial(100)
112
119
  client.close
@@ -121,8 +128,8 @@ class SocketHelperTest < Test::Unit::TestCase
121
128
  client_cert_path = File.join(CERT_CHAINS_DIR, 'cert.pem')
122
129
  client_private_key_path = File.join(CERT_CHAINS_DIR, 'cert-key.pem')
123
130
 
124
- EchoTLSServer.new(cert_path: cert_path, private_key_path: private_key_path, ca_path: client_ca_cert_path).start do
125
- client = SocketHelperTestPlugin.new.socket_create_tls('127.0.0.1', PORT, verify_fqdn: false, cert_path: client_cert_path, private_key_path: client_private_key_path, cert_paths: [cert_path])
131
+ EchoTLSServer.new(@port, cert_path: cert_path, private_key_path: private_key_path, ca_path: client_ca_cert_path).start do
132
+ client = SocketHelperTestPlugin.new.socket_create_tls('127.0.0.1', @port, verify_fqdn: false, cert_path: client_cert_path, private_key_path: client_private_key_path, cert_paths: [cert_path])
126
133
  client.write('hello')
127
134
  assert_equal 'hello', client.readpartial(100)
128
135
  client.close
@@ -133,7 +140,7 @@ class SocketHelperTest < Test::Unit::TestCase
133
140
  cert_path = File.expand_path(File.dirname(__FILE__) + '/data/cert/empty.pem')
134
141
 
135
142
  assert_raise Fluent::ConfigError do
136
- SocketHelperTestPlugin.new.socket_create_tls('127.0.0.1', PORT, cert_path: cert_path)
143
+ SocketHelperTestPlugin.new.socket_create_tls('127.0.0.1', @port, cert_path: cert_path)
137
144
  end
138
145
  end
139
146
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluentd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.13.1
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-29 00:00:00.000000000 Z
11
+ date: 2021-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -1023,7 +1023,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1023
1023
  - !ruby/object:Gem::Version
1024
1024
  version: '0'
1025
1025
  requirements: []
1026
- rubygems_version: 3.2.5
1026
+ rubygems_version: 3.1.6
1027
1027
  signing_key:
1028
1028
  specification_version: 4
1029
1029
  summary: Fluentd event collector