Sha256: d13a57002a7ff3343d23cff0f89a2e985c4a0bad1be98645bb9699588477d143

Contents?: true

Size: 673 Bytes

Versions: 9

Compression:

Stored size: 673 Bytes

Contents

require 'helper'

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

  PORT = unused_port
  CONFIG = %[
    port #{PORT}
    bind 127.0.0.1
    tag  test.netflow
  ]

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

  def test_configure
    d = create_driver
    assert_equal PORT, d.instance.port
    assert_equal '127.0.0.1', d.instance.bind
    assert_equal 'test.netflow', d.instance.tag
    assert_equal :udp, d.instance.protocol_type

    assert_raise Fluent::ConfigError do
      d = create_driver CONFIG + %[
        protocol_type tcp
      ]
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fluent-plugin-netflow-0.2.8 test/test_in_netflow.rb
fluent-plugin-netflow-0.2.7 test/test_in_netflow.rb
fluent-plugin-netflow-0.2.6 test/test_in_netflow.rb
fluent-plugin-netflow-0.2.5 test/test_in_netflow.rb
fluent-plugin-netflow-0.2.4 test/test_in_netflow.rb
fluent-plugin-netflow-0.2.3 test/test_in_netflow.rb
fluent-plugin-netflow-0.2.2 test/test_in_netflow.rb
fluent-plugin-netflow-0.2.1 test/test_in_netflow.rb
fluent-plugin-netflow-0.2.0 test/test_in_netflow.rb