Sha256: 6317b65c9d56081f7f6bda7f239dac5faa6310755f22bd37f8553d2ce245c99c

Contents?: true

Size: 234 Bytes

Versions: 9

Compression:

Stored size: 234 Bytes

Contents

def filter(event)
  event.set('foo', 'bar')
  [event]
end

test "setting the field" do
  in_event { { "myfield" => 123 } }

  # This should fail!
  expect("foo to equal baz") do |events|
    events.first.get('foo') == 'baz'
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
logstash-filter-ruby-3.1.8 spec/fixtures/broken.rb
logstash-filter-ruby-3.1.7 spec/fixtures/broken.rb
logstash-filter-ruby-3.1.6 spec/fixtures/broken.rb
logstash-filter-ruby-3.1.5 spec/fixtures/broken.rb
logstash-filter-ruby-3.1.4 spec/fixtures/broken.rb
logstash-filter-ruby-3.1.3 spec/fixtures/broken.rb
logstash-filter-ruby-3.1.2 spec/fixtures/broken.rb
logstash-filter-ruby-3.1.1 spec/fixtures/broken.rb
logstash-filter-ruby-3.1.0 spec/fixtures/broken.rb