Sha256: 5fa18932b1940b6eebd4a54216846a619e34624f8f2dbdecc0fc3645b75f2764

Contents?: true

Size: 783 Bytes

Versions: 2

Compression:

Stored size: 783 Bytes

Contents

require 'helper'

class ConfigPitOutputTest < Test::Unit::TestCase
  def setup
    Pit.set("test", :data => {"user" => "fiorung", "password" => "xenoblade" })
    Fluent::Test.setup
  end

  def create_driver(conf, pit_id = 'test')
    Fluent::Test::OutputTestDriver.new(Fluent::ConfigPitOutput).configure(conf)
  end

  def test_configure
    driver = create_driver %[
      <pit test>
        type  config_pit_test
        tag   pit_test
        user  $pit[user]
        password $pit[password]
      </pit>
    ]

    assert_equal 'Fluent::ConfigPitTestOutput', driver.instance.plugin.class.to_s
    assert_equal 'pit_test', driver.instance.plugin.tag
    assert_equal 'fiorung', driver.instance.plugin.user
    assert_equal 'xenoblade', driver.instance.plugin.password
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fluent-plugin-config_pit-0.0.2 test/plugin/test_out_config_pit.rb
fluent-plugin-config_pit-0.0.1 test/plugin/test_out_config_pit.rb