We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39e424a commit 6c734f5Copy full SHA for 6c734f5
elasticsearch-transport/spec/elasticsearch/transport/sniffer_spec.rb
@@ -229,6 +229,25 @@
229
it 'correctly parses the port' do
230
expect(hosts[0][:port]).to eq('9250')
231
end
232
+
233
+ context 'when the address is IPv6' do
234
235
+ let(:publish_address) do
236
+ 'example.com/[::1]:9250'
237
+ end
238
239
+ it 'parses the response' do
240
+ expect(hosts.size).to eq(1)
241
242
243
+ it 'uses the hostname' do
244
+ expect(hosts[0][:host]).to eq('example.com')
245
246
247
+ it 'correctly parses the port' do
248
+ expect(hosts[0][:port]).to eq('9250')
249
250
251
252
253
context 'when the address is IPv6' do
0 commit comments