mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
fix dns spec to be more reliable using known forward/reverse values at the time of the test
This commit is contained in:
parent
5039ef9123
commit
388f3da6e4
1 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
require "test_utils"
|
||||
require "logstash/filters/dns"
|
||||
require "resolv"
|
||||
|
||||
describe LogStash::Filters::DNS do
|
||||
extend LogStash::RSpec
|
||||
|
@ -14,8 +15,10 @@ describe LogStash::Filters::DNS do
|
|||
}
|
||||
CONFIG
|
||||
|
||||
sample("host" => "199.192.228.250") do
|
||||
insist { subject["host"] } == "carrera.databits.net"
|
||||
address = Resolv.new.getaddress("aspmx.l.google.com")
|
||||
expected = Resolv.new.getname(address)
|
||||
sample("host" => address) do
|
||||
insist { subject["host"] } == expected
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue