Sha256: fa1920641413a333c384ee11e5d427924bf221bdf39dbc74dac5958a64ec4a68

Contents?: true

Size: 687 Bytes

Versions: 1

Compression:

Stored size: 687 Bytes

Contents

require 'helper'

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

  CONFIG = %[
    tag          input.watch_process
    lookup_user  apache, mycron
  ]

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

  def test_configure
    assert_raise(Fluent::ConfigError) {
      d = create_driver('')
    }
    d = create_driver %[
      tag          input.watch_process
      lookup_user  apache, mycron
    ]
    d.instance.inspect
    assert_equal 'input.watch_process', d.instance.tag
    assert_equal ['apache', 'mycron'], d.instance.lookup_user
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fluent-plugin-watch-process-0.0.1 test/plugin/test_in_watch_process.rb