Sha256: deea9f2785f45b1f8ac19967a3882faf4170357324876ac51e81f3762e64af76

Contents?: true

Size: 786 Bytes

Versions: 9

Compression:

Stored size: 786 Bytes

Contents

require 'helper'

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

  CONFIG = %[
    manager_host      localhost
    manager_port      3306
    manager_username  foo
    manager_password  bar
    tag               replicator.${name}.${event}.${primary_key}
  ]

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

  def test_configure
    assert_raise(Fluent::ConfigError) {
      d = create_driver('')
    }
    d = create_driver(CONFIG)
    d.instance.inspect
    assert_equal 'localhost', d.instance.manager_host
    assert_equal 3306, d.instance.manager_port
    assert_equal 'replicator_manager', d.instance.manager_database
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fluent-plugin-mysql-replicator-0.4.1 test/plugin/test_in_mysql_replicator_multi.rb
fluent-plugin-mysql-replicator-0.4.0 test/plugin/test_in_mysql_replicator_multi.rb
fluent-plugin-mysql-replicator-0.3.1 test/plugin/test_in_mysql_replicator_multi.rb
fluent-plugin-mysql-replicator-0.3.0 test/plugin/test_in_mysql_replicator_multi.rb
fluent-plugin-mysql-replicator-0.2.3 test/plugin/test_in_mysql_replicator_multi.rb
fluent-plugin-mysql-replicator-0.2.2 test/plugin/test_in_mysql_replicator_multi.rb
fluent-plugin-mysql-replicator-0.2.1 test/plugin/test_in_mysql_replicator_multi.rb
fluent-plugin-mysql-replicator-0.2.0 test/plugin/test_in_mysql_replicator_multi.rb
fluent-plugin-mysql-replicator-0.1.1 test/plugin/test_in_mysql_replicator_multi.rb