Fix test failure when run from DNS hijacked ISP

Removes the tld from 'unreachable host' to circumvent DNS hijacking
ISPs returning a 200 response for non-existent domains.

Fixes #7124
This commit is contained in:
Rob Bavey 2017-05-16 12:23:20 -04:00
parent 90432f5265
commit 06823be008

View file

@ -33,7 +33,7 @@ describe LogStash::PluginManager::PackFetchStrategy::Repository do
context "when the remote host is unreachable" do context "when the remote host is unreachable" do
it "returns false and yield a debug message" do it "returns false and yield a debug message" do
# To make sure we really try to connect to a failing host we have to let it through webmock # To make sure we really try to connect to a failing host we have to let it through webmock
host ="#{Time.now.to_i.to_s}-do-not-exist.com" host ="#{Time.now.to_i.to_s}-do-not-exist"
WebMock.disable_net_connect!(:allow => host) WebMock.disable_net_connect!(:allow => host)
ENV["LOGSTASH_PACK_URL"] = "http://#{host}" ENV["LOGSTASH_PACK_URL"] = "http://#{host}"
expect(subject.get_installer_for(plugin_name)).to be_falsey expect(subject.get_installer_for(plugin_name)).to be_falsey