Load logstash environment in tests

Hi,

I am trying to run tests using a logstash environment from a downloaded logstash.

In my spec file, I "require" the "environment.rb" file of a logstash installation, and then run

LogStash::Bundler.setup!({:without => [:build, :development]})

I was hoping this would use all the gems in the logstash installation but instead I get an error

Bundler::GemNotFound: Could not find paquet-0.2.1 in any of the sources materialize at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler/spec_set.rb:87 map! at org/jruby/RubyArray.java:2446 materialize at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler/spec_set.rb:81 specs at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler/definition.rb:159 specs_for at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler/definition.rb:218 requested_specs at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler/definition.rb:207 requested_specs at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler/runtime.rb:109 setup at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler/runtime.rb:21 setup at /usr/local/rvm/gems/jruby-1.7.26/gems/bundler-1.15.1/lib/bundler.rb:101 setup! at /root/logstash-5.4.3/lib/bootstrap/bundler.rb:68 (root) at /root/logstash-5.4.3/lib/bootstrap/environment.rb:68

This is because bundler is picking up the Gemfile from the logstash installation, where paquet is required, but it doesnt know to search for these in the correct location.

Is there something I am doing wrong here? How should I set up my tests to run in a logstash environment?

Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.