Sha256: b2cd6480f1a38f6daf0e30ead7eb3d24c0ee90057096b6a210109451f2745657

Contents?: true

Size: 766 Bytes

Versions: 3

Compression:

Stored size: 766 Bytes

Contents

require 'helper'

class SpectrumInputTest < Test::Unit::TestCase

  def setup
    Fluent::Test.setup
  end

  CONFIG = %[
    username test_username
    password test_password
    endpoint test.endpoint.com
  ]

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

  def test_configure
    assert_nothing_raised { create_driver }
  end

  def test_params
    d = create_driver
    assert_equal "test.endpoint.com", d.instance.endpoint
    assert_equal "test_username", d.instance.username
    assert_equal "test_password", d.instance.password
    assert_equal "10".to_i, d.instance.interval
    assert_equal "false", d.instance.include_raw
    assert_equal 'alert.spectrum', d.instance.tag
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fluent-plugin-spectrum-0.0.8 test/plugin/test_in_spectrum.rb
fluent-plugin-spectrum-0.0.7 test/plugin/test_in_spectrum.rb
fluent-plugin-spectrum-0.0.6 test/plugin/test_in_spectrum.rb