Sha256: 207506f760f265cae4204799f26c66b4d354297ebe7fb2f29d2d89280738f1d0

Contents?: true

Size: 711 Bytes

Versions: 292

Compression:

Stored size: 711 Bytes

Contents

require_relative '../helper'
require 'fluent/test/driver/output'
require 'fluent/plugin/out_relabel'

class RelabelOutputTest < Test::Unit::TestCase
  def setup
    Fluent::Test.setup
  end

  def default_config
    config_element('ROOT', '', {"@type"=>"relabel", "@label"=>"@RELABELED"})
  end

  def create_driver(conf = default_config)
    Fluent::Test::Driver::Output.new(Fluent::Plugin::RelabelOutput).configure(conf)
  end

  def test_process
    d = create_driver

    time = event_time("2011-01-02 13:14:15 UTC")
    d.run(default_tag: 'test') do
      d.feed(time, {"a"=>1})
      d.feed(time, {"a"=>2})
    end
    assert_equal [["test", time, {"a"=>1}], ["test", time, {"a"=>2}]], d.events
  end
end

Version data entries

292 entries across 292 versions & 8 rubygems

Version Path
fluentd-0.14.7-x86-mingw32 test/plugin/test_out_relabel.rb
fluentd-0.14.7 test/plugin/test_out_relabel.rb
fluentd-0.14.6 test/plugin/test_out_relabel.rb
fluentd-0.14.5-x64-mingw32 test/plugin/test_out_relabel.rb
fluentd-0.14.5-x86-mingw32 test/plugin/test_out_relabel.rb
fluentd-0.14.5 test/plugin/test_out_relabel.rb
fluentd-0.14.4-x64-mingw32 test/plugin/test_out_relabel.rb
fluentd-0.14.4-x86-mingw32 test/plugin/test_out_relabel.rb
fluentd-0.14.4 test/plugin/test_out_relabel.rb
fluentd-0.14.3 test/plugin/test_out_relabel.rb
fluentd-0.14.2 test/plugin/test_out_relabel.rb
fluentd-0.14.1 test/plugin/test_out_relabel.rb