Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Failure: 6.5, 6.6, 6.x WebMock::NetConnectNotAllowedError #10274

Closed
colinsurprenant opened this issue Jan 10, 2019 · 1 comment
Closed

Comments

@colinsurprenant
Copy link
Contributor

This test in the Ruby specs is failing on 6.5, 6.6 and 6.x

11:09:18     Failures:
11:09:18 
11:09:18       1) LogStash::Runner logstash modules --modules with an available module specified but no connection to elasticsearch should log fatally and return a bad exit code
11:09:18          Failure/Error: pipelines = LogStash::Config::ModulesCommon.pipeline_configs(settings)
11:09:18          
11:09:18          WebMock::NetConnectNotAllowedError:
11:09:18            Real HTTP connections are disabled. Unregistered request: GET https://localhost:5601/api/status with headers {'Connection'=>'Keep-Alive', 'Content-Type'=>'application/json'}
11:09:18          
11:09:18            You can stub this request with the following snippet:
11:09:18          
11:09:18            stub_request(:get, "https://localhost:5601/api/status").
11:09:18              with(
11:09:18                headers: {
11:09:18            	  'Connection'=>'Keep-Alive',
11:09:18            	  'Content-Type'=>'application/json'
11:09:18                }).
11:09:18              to_return(status: 200, body: "", headers: {})
11:09:18          
11:09:18            ============================================================
11:09:18          # /tmp/vendor/bundle/jruby/2.3.0/gems/webmock-3.5.1/lib/webmock/http_lib_adapters/manticore_adapter.rb:62:in `response_object_for'
11:09:18          # /tmp/vendor/bundle/jruby/2.3.0/gems/manticore-0.6.4-java/lib/manticore/client.rb:425:in `request'
11:09:18          # /tmp/vendor/bundle/jruby/2.3.0/gems/webmock-3.5.1/lib/webmock/http_lib_adapters/manticore_adapter.rb:29:in `request'
11:09:18          # /tmp/vendor/bundle/jruby/2.3.0/gems/manticore-0.6.4-java/lib/manticore/client.rb:247:in `get'
11:09:18          # /tmp/vendor/bundle/jruby/2.3.0/gems/manticore-0.6.4-java/lib/manticore/client.rb:301:in `http'
11:09:18          # ./logstash-core/lib/logstash/modules/kibana_client.rb:134:in `safely'
11:09:18          # ./logstash-core/lib/logstash/modules/kibana_client.rb:111:in `get'
11:09:18          # ./logstash-core/lib/logstash/modules/kibana_client.rb:88:in `initialize'
11:09:18          # ./logstash-core/lib/logstash/config/modules_common.rb:81:in `block in pipeline_configs'
11:09:18          # ./logstash-core/lib/logstash/config/modules_common.rb:54:in `pipeline_configs'
11:09:18          # ./logstash-core/spec/logstash/runner_spec.rb:360:in `block in (root)'
11:09:18          # ./logstash-core/lib/logstash/runner.rb:441:in `create_agent'
11:09:18          # ./logstash-core/lib/logstash/runner.rb:354:in `execute'
11:09:18          # ./vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'
11:09:18          # ./logstash-core/lib/logstash/runner.rb:237:in `run'
11:09:18          # ./vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'
11:09:18          # ./logstash-core/spec/logstash/runner_spec.rb:366:in `block in (root)'
11:09:18          # ./spec/spec_helper.rb:50:in `block in /opt/logstash/spec/spec_helper.rb'
11:09:18          # ./spec/spec_helper.rb:43:in `block in /opt/logstash/spec/spec_helper.rb'
11:09:18          # ./vendor/bundle/jruby/2.3.0/gems/rspec-wait-0.0.9/lib/rspec/wait.rb:46:in `block in /opt/logstash/vendor/bundle/jruby/2.3.0/gems/rspec-wait-0.0.9/lib/rspec/wait.rb'
11:09:18          # ./lib/bootstrap/rspec.rb:13:in `<main>'
11:09:18 
11:09:18     Finished in 8 minutes 8 seconds (files took 9.82 seconds to load)
11:09:18     2433 examples, 1 failure, 9 pending
11:09:18 
11:09:18     Failed examples:
11:09:18 
11:09:18     rspec ./logstash-core/spec/logstash/runner_spec.rb:365 # LogStash::Runner logstash modules --modules with an available module specified but no connection to elasticsearch should log fatally and return a bad exit code
11:09:18 
11:09:18     Randomized with seed 36065
@yaauie
Copy link
Member

yaauie commented Feb 5, 2019

This is fixed on master and 6.x with a commit on #10279 and #10382 respectively that configures Webmock to not intercept connections to localhost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants