Sha256: 19fb6de2e7157b04930ce8aed40f2a088af973fa13fb5e139d898e2f2a3a0ed4

Contents?: true

Size: 573 Bytes

Versions: 287

Compression:

Stored size: 573 Bytes

Contents

require_relative '../helper'
require 'fluent/test/driver/formatter'
require 'fluent/plugin/formatter_msgpack'

class MessagePackFormatterTest < ::Test::Unit::TestCase
  def setup
    @time = event_time
  end

  def create_driver(conf = "")
    Fluent::Test::Driver::Formatter.new(Fluent::Plugin::MessagePackFormatter).configure(conf)
  end

  def tag
    "tag"
  end

  def record
    {'message' => 'awesome'}
  end

  def test_format
    d = create_driver({})
    formatted = d.instance.format(tag, @time, record)

    assert_equal(record.to_msgpack, formatted)
  end
end

Version data entries

287 entries across 287 versions & 8 rubygems

Version Path
fluentd-1.13.3-x86-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.13.3-x64-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.13.3 test/plugin/test_formatter_msgpack.rb
fluentd-1.13.2-x86-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.13.2-x64-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.13.2 test/plugin/test_formatter_msgpack.rb
fluentd-1.13.1-x86-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.13.1-x64-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.13.1 test/plugin/test_formatter_msgpack.rb
fluentd-1.13.0-x64-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.13.0-x86-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.13.0 test/plugin/test_formatter_msgpack.rb
fluentd-1.12.4-x64-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.12.4-x86-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.12.4 test/plugin/test_formatter_msgpack.rb
fluentd-1.12.3-x86-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.12.3-x64-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.12.3 test/plugin/test_formatter_msgpack.rb
fluentd-1.12.2-x86-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.12.2-x64-mingw32 test/plugin/test_formatter_msgpack.rb