Sha256: 64318d519cdc34af458cd75f5da4e610b7da1365d00b127e755d701709cd0c9e

Contents?: true

Size: 758 Bytes

Versions: 6

Compression:

Stored size: 758 Bytes

Contents

require 'helper'
require 'fluent/test/driver/input'

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::Driver::Input.new(Fluent::Plugin::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_equal 2048, d.instance.max_bytes

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

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
fluent-plugin-netflow-1.1.0 test/test_in_netflow.rb
fluent-plugin-netflow-1.0.2 test/test_in_netflow.rb
fluent-plugin-netflow-1.0.1 test/test_in_netflow.rb
fluent-plugin-netflow-1.0.0.rc2 test/test_in_netflow.rb
fluent-plugin-netflow-enchanced-1.0.0.rc1 test/test_in_netflow.rb
fluent-plugin-netflow-1.0.0.rc1 test/test_in_netflow.rb