Sha256: 0e94b6298a2e4c3638cee528b08bf0ac777fb675e2acde455962fb21f08cc097

Contents?: true

Size: 787 Bytes

Versions: 4

Compression:

Stored size: 787 Bytes

Contents

require 'helper'
require 'fluent/test/driver/input'

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)
    Fluent::Test::Driver::Input.new(Fluent::Plugin::MysqlReplicatorMultiInput).configure(conf)
  end

  def test_configure
    assert_raise(Fluent::ConfigError) {
      d = create_driver('')
    }
    d = create_driver(CONFIG)
    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

4 entries across 4 versions & 1 rubygems

Version Path
fluent-plugin-mysql-replicator-1.0.3 test/plugin/test_in_mysql_replicator_multi.rb
fluent-plugin-mysql-replicator-1.0.2 test/plugin/test_in_mysql_replicator_multi.rb
fluent-plugin-mysql-replicator-1.0.1 test/plugin/test_in_mysql_replicator_multi.rb
fluent-plugin-mysql-replicator-1.0.0 test/plugin/test_in_mysql_replicator_multi.rb