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.16.7-x64-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.16.7-x86-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.16.7-x64-mingw-ucrt test/plugin/test_out_relabel.rb
fluentd-1.16.7 test/plugin/test_out_relabel.rb
fluent-plugin-nuopenlineage-light-0.1.0 vendor/bundle/ruby/3.3.0/gems/fluentd-1.17.0-x64-mingw-ucrt/test/plugin/test_out_relabel.rb
fluentd-1.16.6-x86-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.16.6-x64-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.16.6-x64-mingw-ucrt test/plugin/test_out_relabel.rb
fluentd-1.16.6 test/plugin/test_out_relabel.rb
fluent-plugin-openlineage-light-0.1.4 vendor/bundle/ruby/3.3.0/gems/fluentd-1.17.0-x64-mingw-ucrt/test/plugin/test_out_relabel.rb
fluent-plugin-openlineage-light-0.1.3 vendor/bundle/ruby/3.3.0/gems/fluentd-1.17.0-x64-mingw-ucrt/test/plugin/test_out_relabel.rb
fluent-plugin-openlineage-0.1.0 vendor/bundle/ruby/3.3.0/gems/fluentd-1.17.0-x64-mingw-ucrt/test/plugin/test_out_relabel.rb
fluentd-1.17.0-x86-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.17.0-x64-mingw-ucrt test/plugin/test_out_relabel.rb
fluentd-1.17.0-x64-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.17.0 test/plugin/test_out_relabel.rb
fluentd-1.16.5-x64-mingw-ucrt test/plugin/test_out_relabel.rb
fluentd-1.16.5-x86-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.16.5-x64-mingw32 test/plugin/test_out_relabel.rb
fluentd-1.16.5 test/plugin/test_out_relabel.rb