Sha256: 397cda362ab8c27a4c5668573799b757f44af009eda83d84c823a7046c8373b4

Contents?: true

Size: 1.56 KB

Versions: 9

Compression:

Stored size: 1.56 KB

Contents

#
# Fluentd Kubernetes Metadata Filter Plugin - Enrich Fluentd events with
# Kubernetes metadata
#
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
require 'codeclimate-test-reporter'
SimpleCov.start do
  formatter SimpleCov::Formatter::MultiFormatter.new [
    SimpleCov::Formatter::HTMLFormatter,
    CodeClimate::TestReporter::Formatter
  ]
end

require 'rr'
require 'test/unit'
require 'test/unit/rr'
require 'fileutils'
require 'fluent/log'
require 'fluent/test'
require 'webmock/test_unit'
require 'vcr'

VCR.configure do |config|
  config.cassette_library_dir = 'test/cassettes'
  config.hook_into :webmock # or :fakeweb
  config.ignore_hosts 'codeclimate.com'
end

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

9 entries across 9 versions & 1 rubygems

Version Path
fluent-plugin-kubernetes_metadata_filter-0.22.0 test/helper.rb
fluent-plugin-kubernetes_metadata_filter-0.21.0 test/helper.rb
fluent-plugin-kubernetes_metadata_filter-0.20.0 test/helper.rb
fluent-plugin-kubernetes_metadata_filter-0.19.0 test/helper.rb
fluent-plugin-kubernetes_metadata_filter-0.18.0 test/helper.rb
fluent-plugin-kubernetes_metadata_filter-0.17.0 test/helper.rb
fluent-plugin-kubernetes_metadata_filter-0.16.0 test/helper.rb
fluent-plugin-kubernetes_metadata_filter-0.15.0 test/helper.rb
fluent-plugin-kubernetes_metadata_filter-0.14.0 test/helper.rb