mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Relax the Geoip filter test
Since the database of the plugin can be update we cannot do a strict assert on the geoip lat/long values instead we will use a range of possible and valid latitude and longitude. Fixes: #7119 Fixes #7122
This commit is contained in:
parent
66f0b52318
commit
90432f5265
1 changed files with 4 additions and 3 deletions
|
@ -31,10 +31,11 @@ describe "Test Elasticsearch output" do
|
|||
expect(s["bytes"]).to eq(18848)
|
||||
expect(s["response"]).to eq(200)
|
||||
expect(s["clientip"]).to eq("213.113.233.227")
|
||||
expect(s["geoip"]["longitude"]).to eq(12.9443)
|
||||
expect(s["geoip"]["latitude"]).to eq(56.1357)
|
||||
# Use a range instead of a fixed number
|
||||
# update on the geoip data can change the values
|
||||
expect(s["geoip"]["longitude"]).to be_between(-180, 180)
|
||||
expect(s["geoip"]["latitude"]).to be_between(-90, 90)
|
||||
expect(s["verb"]).to eq("GET")
|
||||
expect(s["useragent"]["os"]).to eq("Windows 7")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue