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.15.3 test/plugin/test_formatter_msgpack.rb
fluentd-1.15.2-x86-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.15.2-x64-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.15.2-x64-mingw-ucrt test/plugin/test_formatter_msgpack.rb
fluentd-1.15.2 test/plugin/test_formatter_msgpack.rb
fluentd-1.15.1-x86-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.15.1-x64-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.15.1-x64-mingw-ucrt test/plugin/test_formatter_msgpack.rb
fluentd-1.15.1 test/plugin/test_formatter_msgpack.rb
fluentd-1.15.0-x86-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.15.0-x64-mingw-ucrt test/plugin/test_formatter_msgpack.rb
fluentd-1.15.0-x64-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.15.0 test/plugin/test_formatter_msgpack.rb
dtomasgu-fluentd-1.14.8.pre.dev test/plugin/test_formatter_msgpack.rb
dtomasgu-fluentd-1.14.7.pre.dev test/plugin/test_formatter_msgpack.rb
fluentd-1.14.6-x86-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.14.6-x64-mingw-ucrt test/plugin/test_formatter_msgpack.rb
fluentd-1.14.6-x64-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.14.6 test/plugin/test_formatter_msgpack.rb
fluentd-1.14.5-x64-mingw-ucrt test/plugin/test_formatter_msgpack.rb