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-1.14.0-x86-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.14.0-x64-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.14.0 test/plugin/test_out_relabel.rb
fluentd-1.14.0.rc test/plugin/test_out_relabel.rb
fluentd-1.13.3-x86-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.13.3-x64-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.13.3 test/plugin/test_out_relabel.rb
fluentd-1.13.2-x86-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.13.2-x64-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.13.2 test/plugin/test_out_relabel.rb
fluentd-1.13.1-x86-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.13.1-x64-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.13.1 test/plugin/test_out_relabel.rb
fluentd-1.13.0-x64-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.13.0-x86-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.13.0 test/plugin/test_out_relabel.rb
fluentd-1.12.4-x64-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.12.4-x86-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.12.4 test/plugin/test_out_relabel.rb
fluentd-1.12.3-x86-mingw32 test/plugin/test_out_relabel.rb