Sha256: 524575f58eabc9d0d909439c2dd9e08306588d8c92c3f94bf23e0d1c4330616c

Contents?: true

Size: 763 Bytes

Versions: 2

Compression:

Stored size: 763 Bytes

Contents

require 'helper'

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

  CONFIG = %[
    type sforce
    username test@example.com
    password hogefuga
    tag test.access
    query SELECT id, Name FROM Account
    polling_interval 60
  ]

  def test_configure
    d = create_driver

    assert_equal 'test@example.com', d.instance.username
    assert_equal 'hogefuga', d.instance.password
    assert_equal 'test.access', d.instance.tag
    assert_equal 'SELECT id, Name FROM Account', d.instance.query
    assert_equal 60, d.instance.polling_interval
  end

  # TODO
  def test_emit; end

  private

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fluent-plugin-sforce-0.0.6 test/plugin/test_in_sforce.rb
fluent-plugin-sforce-0.0.5 test/plugin/test_in_sforce.rb