mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Fix broken tests
This commit is contained in:
parent
9466ad881a
commit
15438097cc
1 changed files with 4 additions and 4 deletions
|
@ -28,7 +28,7 @@ describe "apache common log format" do
|
|||
# See http://rubydoc.info/gems/insist for more info.
|
||||
|
||||
# Require that grok does not fail to parse this event.
|
||||
reject { subject["@tags"] }.include?("_grokparsefailure")
|
||||
insist { subject["tags"] }.nil?
|
||||
|
||||
# Ensure that grok captures certain expected fields.
|
||||
insist { subject }.include?("agent")
|
||||
|
@ -52,15 +52,15 @@ describe "apache common log format" do
|
|||
insist { subject["agent"] } == "\"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1\""
|
||||
|
||||
# Verify date parsing
|
||||
insist { subject.timestamp } == "2012-08-30T00:17:38.000Z"
|
||||
insist { subject.timestamp } == Time.iso8601("2012-08-30T00:17:38.000Z")
|
||||
end
|
||||
|
||||
sample '61.135.248.195 - - [26/Sep/2012:11:49:20 -0400] "GET /projects/keynav/ HTTP/1.1" 200 18985 "" "Mozilla/5.0 (compatible; YodaoBot/1.0; http://www.yodao.com/help/webmaster/spider/; )"' do
|
||||
reject { subject["@tags"] }.include?("_grokparsefailure")
|
||||
insist { subject["tags"] }.nil?
|
||||
insist { subject["clientip"] } == "61.135.248.195"
|
||||
end
|
||||
|
||||
sample '72.14.164.185 - - [25/Sep/2012:12:05:02 -0400] "GET /robots.txt HTTP/1.1" 200 - "www.brandimensions.com" "BDFetch"' do
|
||||
reject { subject["@tags"] }.include?("_grokparsefailure")
|
||||
insist { subject["tags"] }.nil?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue