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
fluentd222-1.16.2-x86_64-linux test/plugin/test_formatter_msgpack.rb
fluentd-1.16.3-x86-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.16.3-x64-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.16.3-x64-mingw-ucrt test/plugin/test_formatter_msgpack.rb
fluentd-1.16.3 test/plugin/test_formatter_msgpack.rb
fluentd-1.16.2-x86-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.16.2-x64-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.16.2-x64-mingw-ucrt test/plugin/test_formatter_msgpack.rb
fluentd-1.16.2 test/plugin/test_formatter_msgpack.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/fluentd-1.16.1/test/plugin/test_formatter_msgpack.rb
fluentd-1.16.1-x64-mingw-ucrt test/plugin/test_formatter_msgpack.rb
fluentd-1.16.1-x64-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.16.1-x86-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.16.1 test/plugin/test_formatter_msgpack.rb
fluentd-1.16.0-x64-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.16.0-x64-mingw-ucrt test/plugin/test_formatter_msgpack.rb
fluentd-1.16.0 test/plugin/test_formatter_msgpack.rb
fluentd-1.15.3-x86-mingw32 test/plugin/test_formatter_msgpack.rb
fluentd-1.15.3-x64-mingw-ucrt test/plugin/test_formatter_msgpack.rb
fluentd-1.15.3-x64-mingw32 test/plugin/test_formatter_msgpack.rb