Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

vistahigherlearning / logstash   deb

Repository URL to install this package:

Version: 1.4.2-1-2c0f5a1 

/ opt / logstash / spec / support / date-http.rb

require "test_utils"

describe "http dates", :if => RUBY_ENGINE == "jruby" do
  extend LogStash::RSpec

  config <<-'CONFIG'
    filter {
      date {
        match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
        locale => "en"
      }
    }
  CONFIG

  sample("timestamp" => "25/Mar/2013:20:33:56 +0000") do
    insist { subject["@timestamp"] } == Time.iso8601("2013-03-25T20:33:56.000Z")
  end
end