logstash-plugins/logstash-filter-geoip

Failure in testing config without database path in LS >= 7.14

andsel opened this issue · 1 comments

Build scan:
https://app.travis-ci.com/github/logstash-plugins/logstash-filter-geoip/builds/267431039

Repro line:

bundle exec rspec -e "LogStash::Filters::GeoIP config without database path in LS >= 7.14"

Reproduces locally?:
yes

Applicable branches:
main

Failure history:

Failure excerpt:

andrea:logstash-filter-geoip (main) % bundle exec rspec -e "LogStash::Filters::GeoIP config without database path in LS >= 7.14"
Sending Logstash logs to null which is now configured via log4j2.properties
/Users/andrea/workspace/logstash_plugins/logstash-filter-geoip/spec/filters/geoip_offline_spec.rb:6: warning: already initialized constant CITYDB
/Users/andrea/workspace/logstash_plugins/logstash-filter-geoip/spec/filters/geoip_offline_spec.rb:7: warning: already initialized constant ASNDB
Run options:
  include {:full_description=>/LogStash::Filters::GeoIP\ config\ without\ database\ path\ in\ LS\ >=\ 7\.14/}
  exclude {:integration=>true, :redis=>true, :socket=>true, :performance=>true, :couchdb=>true, :elasticsearch=>true, :elasticsearch_secure=>true, :export_cypher=>true, :windows=>true}

Randomized with seed 52169
F

Failures:

  1) LogStash::Filters::GeoIP config without database path in LS >= 7.14 restart the plugin should use the same database
     Got 1 failure and 1 other error:

     1.1) Failure/Error: expect(first_dirname).not_to be_nil

            expected: not nil
                 got: nil
          # ./spec/filters/geoip_online_spec.rb:44:in `block in <main>'
          # /Users/andrea/.rvm/gems/jruby-9.4.2.0/gems/logstash-devutils-2.5.0-java/lib/logstash/devutils/rspec/spec_helper.rb:61:in `block in <main>'

     1.2) Failure/Error: ::File.join(get_data_dir, filename)

          TypeError:
            no implicit conversion of nil into String
          # ./spec/filters/test_helper.rb:14:in `get_file_path'
          # ./spec/filters/geoip_online_spec.rb:46:in `block in <main>'
          # /Users/andrea/.rvm/gems/jruby-9.4.2.0/gems/logstash-devutils-2.5.0-java/lib/logstash/devutils/rspec/spec_helper.rb:61:in `block in <main>'

Finished in 0.11056 seconds (files took 1.71 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/filters/geoip_online_spec.rb:29 # LogStash::Filters::GeoIP config without database path in LS >= 7.14 restart the plugin should use the same database

Randomized with seed 52169

Resolved with #220