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 / pull375.rb

# encoding: utf-8

# This spec covers the question here:
# https://github.com/logstash/logstash/pull/375

require "test_utils"

describe "pull #375" do
  extend LogStash::RSpec
  describe  "kv after grok" do
    config <<-CONFIG
      filter {
        grok { pattern => "%{URIPATH:mypath}%{URIPARAM:myparams}" }
        kv { source => "myparams" field_split => "&?" }
      }
    CONFIG

    sample "/some/path?foo=bar&baz=fizz" do
      insist { subject["foo"] } == "bar"
      insist { subject["baz"] } == "fizz"
    end
  end
end