Sha256: 8fc5a64c7c782383528373c2465cb0fb4c7903a025103ebc0140af0047ac81bf

Contents?: true

Size: 712 Bytes

Versions: 20

Compression:

Stored size: 712 Bytes

Contents

require 'fluent/test'

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

  CONFIG = %[
    send_timeout 51
    <server>
      name test
      host 127.0.0.1
      port 13999
    </server>
  ]

  def create_driver(conf=CONFIG)
    Fluent::Test::OutputTestDriver.new(Fluent::ForwardOutput) do
      def write(chunk)
        chunk.read
      end
    end.configure(conf)
  end

  def test_configure
    d = create_driver
    nodes = d.instance.nodes
    assert_equal 51, d.instance.send_timeout
    assert_equal 1, nodes.length
    node = nodes.values.first
    assert_equal "test", node.name
    assert_equal '127.0.0.1', node.host
    assert_equal 13999, node.port
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
fluentd-0.10.25 test/plugin/out_forward.rb
fluentd-0.10.24 test/plugin/out_forward.rb
fluentd-0.10.23 test/plugin/out_forward.rb
fluentd-0.10.22 test/plugin/out_forward.rb
fluentd-0.10.21 test/plugin/out_forward.rb
fluentd-0.10.20 test/plugin/out_forward.rb
fluentd-0.10.19 test/plugin/out_forward.rb
fluentd-0.10.18 test/plugin/out_forward.rb
fluentd-0.10.17 test/plugin/out_forward.rb
fluentd-0.10.16 test/plugin/out_forward.rb
fluentd-0.10.15 test/plugin/out_forward.rb
fluentd-0.10.13 test/plugin/out_forward.rb
fluentd-0.10.12 test/plugin/out_forward.rb
fluentd-0.10.11 test/plugin/out_forward.rb
fluentd-0.10.10 test/plugin/out_forward.rb
fluentd-0.10.9 test/plugin/out_forward.rb
fluentd-0.10.8 test/plugin/out_forward.rb
fluentd-0.10.7 test/plugin/out_forward.rb
fluentd-0.10.6 test/plugin/out_forward.rb
fluentd-0.10.5 test/plugin/out_forward.rb