Skip to content

Commit

Permalink
Mock additional x-pack settings to avoid missing configuration errors (
Browse files Browse the repository at this point in the history
…#211)

This commit mocks the additional x-pack settings to avoid missing configuration errors
  • Loading branch information
edmocosta authored Jan 23, 2023
1 parent 099f1fd commit 59a233f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/filters/geoip_online_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
dir_path = Stud::Temporary.directory
File.open(dir_path + '/uuid', 'w') { |f| f.write(SecureRandom.uuid) }
allow(LogStash::SETTINGS).to receive(:get).and_call_original
allow(LogStash::SETTINGS).to receive(:get).with("xpack.geoip.downloader.enabled").and_return(true)
allow(LogStash::SETTINGS).to receive(:get).with("xpack.geoip.download.endpoint").and_return(nil)
allow(LogStash::SETTINGS).to receive(:get).with("path.data").and_return(dir_path)
end

Expand Down

0 comments on commit 59a233f

Please sign in to comment.