Skip to content

Commit eec83f2

Browse files
committed
Don't use fake.com for tests
1 parent 728e06b commit eec83f2

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

elasticsearch-transport/lib/elasticsearch/transport/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def initialize(arguments={}, &block)
9898
@arguments[:randomize_hosts] ||= false
9999
@arguments[:transport_options] ||= {}
100100
@arguments[:http] ||= {}
101-
@options[:http] ||= {}
101+
@options[:http] ||= {}
102102

103103
@seeds = __extract_hosts(@arguments[:hosts] ||
104104
@arguments[:host] ||

elasticsearch-transport/spec/elasticsearch/transport/base_spec.rb

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@
1818
require 'spec_helper'
1919

2020
describe Elasticsearch::Transport::Transport::Base do
21-
2221
context 'when a host is printed in a logged message' do
23-
2422
shared_examples_for 'a redacted string' do
25-
2623
let(:client) do
2724
Elasticsearch::Transport::Client.new(arguments)
2825
end
@@ -33,6 +30,7 @@
3330

3431
it 'does not include the password in the logged string' do
3532
expect(logger).not_to receive(:error).with(/secret_password/)
33+
3634
expect {
3735
client.cluster.stats
3836
}.to raise_exception(Faraday::ConnectionFailed)
@@ -47,7 +45,6 @@
4745
end
4846

4947
context 'when the user and password are provided as separate arguments' do
50-
5148
let(:arguments) do
5249
{ hosts: 'fake',
5350
logger: logger,
@@ -59,19 +56,17 @@
5956
end
6057

6158
context 'when the user and password are provided in the string URI' do
62-
6359
let(:arguments) do
64-
{ hosts: 'http://test:secret_password@fake.com',
60+
{ hosts: 'https://test:secret_password@fake_local_elasticsearch',
6561
logger: logger }
6662
end
6763

6864
it_behaves_like 'a redacted string'
6965
end
7066

7167
context 'when the user and password are provided in the URI object' do
72-
7368
let(:arguments) do
74-
{ hosts: URI.parse('http://test:secret_password@fake.com'),
69+
{ hosts: URI.parse('https://test:secret_password@fake_local_elasticsearch'),
7570
logger: logger }
7671
end
7772

0 commit comments

Comments
 (0)