Sha256: f324bdb0b5b94ea71536b68dd08d9f1ee55da4a16b3479064c0a68b681bc4e0e

Contents?: true

Size: 693 Bytes

Versions: 23

Compression:

Stored size: 693 Bytes

Contents

require 'helper'

class KafkaOutputTest < Test::Unit::TestCase
  def setup
    Fluent::Test.setup
  end

  CONFIG = %[
    default_topic kitagawakeiko
    brokers localhost:9092
  ]

  def create_driver(conf = CONFIG, tag='test')
    Fluent::Test::BufferedOutputTestDriver.new(Fluent::KafkaOutput, tag).configure(conf)
  end

  def test_configure
    d = create_driver
    assert_equal 'kitagawakeiko', d.instance.default_topic
    assert_equal 'localhost:9092', d.instance.brokers
  end

  def test_format
    d = create_driver
  end

  def test_write
    d = create_driver
    time = Time.parse("2011-01-02 13:14:15 UTC").to_i
    d.emit({"a"=>1}, time)
    d.emit({"a"=>2}, time)
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
fluent-plugin-kafka-0.2.1 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.2.0 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.1.5 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.1.4 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-zendesk-0.1.4 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.1.3 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.1.2 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.1.1 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.1.0 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.0.18 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.0.17 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.0.16 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.0.15 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.0.14 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.0.13 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.0.12 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.0.11 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.0.10 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.0.9 test/plugin/test_out_kafka.rb
fluent-plugin-kafka-0.0.8 test/plugin/test_out_kafka.rb