Sha256: 4e435165d09f27b0d4984592ae9b3414f5f4eaf0eeace024245dea04b400ce17

Contents?: true

Size: 1.04 KB

Versions: 15

Compression:

Stored size: 1.04 KB

Contents

# simplecov must be loaded before any of target code
if ENV['SIMPLE_COV']
  require 'simplecov'
  if defined?(SimpleCov::SourceFile)
    mod = SimpleCov::SourceFile
    def mod.new(*args, &block)
      m = allocate
      m.instance_eval do
        begin
          initialize(*args, &block)
        rescue Encoding::UndefinedConversionError
          @src = "".force_encoding('UTF-8')
        end
      end
      m
    end
  end
  unless SimpleCov.running
    SimpleCov.start do
      add_filter '/test/'
      add_filter '/gems/'
    end
  end
end

require 'rr'
require 'test/unit'
require 'test/unit/rr'
require 'fileutils'
require 'fluent/log'
require 'fluent/test'

unless defined?(Test::Unit::AssertionFailedError)
  class Test::Unit::AssertionFailedError < StandardError
  end
end

def unused_port
  s = TCPServer.open(0)
  port = s.addr[1]
  s.close
  port
end

def ipv6_enabled?
  require 'socket'

  begin
    TCPServer.open("::1", 0)
    true
  rescue
    false
  end
end

$log = Fluent::Log.new(Fluent::Test::DummyLogDevice.new, Fluent::Log::LEVEL_WARN)

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
fluentd-0.12.10 test/helper.rb
fluentd-0.12.9 test/helper.rb
fluentd-0.12.8 test/helper.rb
fluentd-0.12.7 test/helper.rb
fluentd-0.12.6 test/helper.rb
fluentd-0.12.5 test/helper.rb
fluent-plugin-tail-ex-rotate-0.0.3 test/helper.rb
fluent-plugin-tail-ex-rotate-0.0.2 test/helper.rb
fluent-plugin-tail-ex-rotate-0.0.1 test/helper.rb
fluentd-0.12.4 test/helper.rb
fluentd-0.12.3 test/helper.rb
fluentd-0.12.2 test/helper.rb
fluentd-0.12.1 test/helper.rb
fluentd-0.12.0 test/helper.rb
fluentd-0.12.0.pre.3 test/helper.rb