Sha256: 13f517f364c9e2bc8f5d9b3de2f7652f50d8c6214cbd1a5e5f5739268fd46d91

Contents?: true

Size: 1010 Bytes

Versions: 1

Compression:

Stored size: 1010 Bytes

Contents

require 'helper'

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

  CONFIG = %[
    host            localhost
    port            5433
    interval        30
    tag             input.vertica
    query           \echo test
    record_host yes
  ]

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

  def test_configure
    assert_raise(Fluent::ConfigError) {
      d = create_driver('')
    }
    d = create_driver %[
      host            localhost
      port            5433
      interval        30
      tag             input.vertica
      query           \echo test
      record_host yes
    ]
    assert_equal 'localhost', d.instance.host
    assert_equal 5433, d.instance.port
    assert_equal 30, d.instance.interval
    assert_equal 'input.vertica', d.instance.tag
    assert_equal true, d.instance.record_host
    assert_equal false, d.instance.nest_result
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fluent-plugin-vertica-query-0.0.7 test/plugin/test_in_vertica_query.rb