Sha256: 03d9215f1a90e8f2df8a196a1f8f9c6579f4a79646d744b80318b58e661a02c5
Contents?: true
Size: 832 Bytes
Versions: 1
Compression:
Stored size: 832 Bytes
Contents
# encoding: utf-8 require 'spec_helper' require "logstash/filters/stag" describe LogStash::Filters::Stag do describe "Set to Hello World" do let(:config) do <<-CONFIG filter { stag { message => "Hello World" } } CONFIG end sample("message" => "some text") do expect(subject).to include("message") expect(subject['message']).to eq('Hello World') end end describe "service tagging" do let(:config) do <<-CONFIG filter { stag {} } CONFIG end sample("message" => "{\"host\": \"skp-vgfcsypweb1\"}") do puts "="*100 puts "subject=#{subject}" expect(subject).to include("message") expect(subject['message']).to include('host') expect(subject['message']).to include('service') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
logstash-filter-stag-0.0.2 | spec/filters/example_spec.rb |