Sha256: 09b35524112bc687f778048e49640dc381999ecfcc964a1cb4549309948909a1

Contents?: true

Size: 719 Bytes

Versions: 14

Compression:

Stored size: 719 Bytes

Contents

require_relative '../helper'
require 'fluent/test/driver/parser'
require 'fluent/plugin/parser'

module ParserTest
  class BaseParserTest < ::Test::Unit::TestCase
    def setup
      Fluent::Test.setup
    end

    def create_driver(conf={})
      Fluent::Test::Driver::Parser.new(Fluent::Plugin::Parser).configure(conf)
    end

    def test_init
      d = create_driver
      assert_true d.instance.estimate_current_event
    end

    def test_configure_against_string_literal
      d = create_driver('keep_time_key true')
      assert_true d.instance.keep_time_key
    end

    def test_parse
      d = create_driver
      assert_raise NotImplementedError do
        d.instance.parse('')
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fluentd-0.14.8 test/plugin/test_parser_base.rb
fluentd-0.14.7-x64-mingw32 test/plugin/test_parser_base.rb
fluentd-0.14.7-x86-mingw32 test/plugin/test_parser_base.rb
fluentd-0.14.7 test/plugin/test_parser_base.rb
fluentd-0.14.6 test/plugin/test_parser_base.rb
fluentd-0.14.5-x64-mingw32 test/plugin/test_parser_base.rb
fluentd-0.14.5-x86-mingw32 test/plugin/test_parser_base.rb
fluentd-0.14.5 test/plugin/test_parser_base.rb
fluentd-0.14.4-x64-mingw32 test/plugin/test_parser_base.rb
fluentd-0.14.4-x86-mingw32 test/plugin/test_parser_base.rb
fluentd-0.14.4 test/plugin/test_parser_base.rb
fluentd-0.14.3 test/plugin/test_parser_base.rb
fluentd-0.14.2 test/plugin/test_parser_base.rb
fluentd-0.14.1 test/plugin/test_parser_base.rb