Sha256: bcb488f5dd464978bdf239a7c784de1b0682d5c5ba8c88a109c83c60c3847ab6

Contents?: true

Size: 704 Bytes

Versions: 2

Compression:

Stored size: 704 Bytes

Contents

require 'helper'

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

  def create_driver(conf)
    Fluent::Test::InputTestDriver.new(Fluent::PrestoQueryInput).configure(conf)
  end

  def test_configure_full
    d = create_driver %q{
      tag test
      interval 10m
      sql select * from hoge
      host presto-cordinator
    }

    assert_equal 'test', d.instance.tag
    assert_equal 10 * 60, d.instance.interval
    assert_equal 'select * from hoge', d.instance.sql
    assert_equal 'presto-cordinator', d.instance.host
  end

  def test_configure_error_when_config_is_empty
    assert_raise(Fluent::ConfigError) do
      create_driver ''
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fluent-plugin-presto_query-0.0.3 test/plugin/test_in_presto_query.rb
fluent-plugin-presto_query-0.0.2 test/plugin/test_in_presto_query.rb