Sha256: 3b8134af3c0904f3b4d41753736ae071bc7948d8576df595108d1c828369402d

Contents?: true

Size: 1.02 KB

Versions: 10

Compression:

Stored size: 1.02 KB

Contents

require 'helper'

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

  CONFIG = %[
    host            localhost
    port            3306
    interval        30
    tag             input.mysql
    query           SELECT id, text from search_text
    record_hostname yes
  ]

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

  def test_configure
    assert_raise(Fluent::ConfigError) {
      d = create_driver('')
    }
    d = create_driver %[
      host            localhost
      port            3306
      interval        30
      tag             input.mysql
      query           SELECT id, text from search_text
      enable_delete   no
    ]
    d.instance.inspect
    assert_equal 'localhost', d.instance.host
    assert_equal 3306, d.instance.port
    assert_equal 30, d.instance.interval
    assert_equal 'input.mysql', d.instance.tag
    assert_equal false, d.instance.enable_delete
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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