Sha256: 7e9c5abb9ef80ac56d21b9c84db3a5d9e9b691564ba9f9f42e898ff6c4ea86d1

Contents?: true

Size: 878 Bytes

Versions: 26

Compression:

Stored size: 878 Bytes

Contents

require 'test_helper'

class MongoTailInputTest < Test::Unit::TestCase
  def setup
    Fluent::Test.setup
    require 'fluent/plugin/in_mongo_tail'
  end

  CONFIG = %[
    type mongo_tail
    database test
    collection log
    tag_key tag
    time_key time
    id_store_file /tmp/fluent_mongo_last_id
  ]

  def create_driver(conf = CONFIG)
    Fluent::Test::InputTestDriver.new(Fluent::MongoTailInput).configure(conf)
  end

  def test_configure
    d = create_driver
    assert_equal('localhost', d.instance.host)
    assert_equal(27017, d.instance.port)
    assert_equal('test', d.instance.database)
    assert_equal('log', d.instance.collection)
    assert_equal('tag', d.instance.tag_key)
    assert_equal('time', d.instance.time_key)
    assert_equal('/tmp/fluent_mongo_last_id', d.instance.id_store_file)
  end

  def test_emit
    # TODO: write actual code
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
fluent-plugin-mongo-0.7.7 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.7.6 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.7.5 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.7.4 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.7.3 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.7.2 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.7.1 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.7.0 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.6.13 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.6.12 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.6.11 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.6.10 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.6.9 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.6.8 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.6.7 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.6.6 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.6.5 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.6.4 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.6.3 test/plugin/in_mongo_tail.rb
fluent-plugin-mongo-0.6.2 test/plugin/in_mongo_tail.rb