Sha256: 3b2ab042ee8154170de93ad0f713e79ecc3fa55a3d49933bc74f416475e3fad7

Contents?: true

Size: 1.34 KB

Versions: 231

Compression:

Stored size: 1.34 KB

Contents

require_relative '../helper'
require 'fluent/counter/error'

class CounterErrorTest < ::Test::Unit::TestCase
  setup do
    @message = 'error message'
  end

  test 'invalid_params' do
    error = Fluent::Counter::InvalidParams.new(@message)
    expected = { 'code' => 'invalid_params', 'message' => @message }
    assert_equal expected, error.to_hash
  end

  test 'unknown_key' do
    error = Fluent::Counter::UnknownKey.new(@message)
    expected = { 'code' => 'unknown_key', 'message' => @message }
    assert_equal expected, error.to_hash
  end

  test 'parse_error' do
    error = Fluent::Counter::ParseError.new(@message)
    expected = { 'code' => 'parse_error', 'message' => @message }
    assert_equal expected, error.to_hash
  end

  test 'method_not_found' do
    error = Fluent::Counter::MethodNotFound.new(@message)
    expected = { 'code' => 'method_not_found', 'message' => @message }
    assert_equal expected, error.to_hash
  end

  test 'invalid_request' do
    error = Fluent::Counter::InvalidRequest.new(@message)
    expected = { 'code' => 'invalid_request', 'message' => @message }
    assert_equal expected, error.to_hash
  end

  test 'internal_server_error' do
    error = Fluent::Counter::InternalServerError.new(@message)
    expected = { 'code' => 'internal_server_error', 'message' => @message }
    assert_equal expected, error.to_hash
  end
end

Version data entries

231 entries across 231 versions & 7 rubygems

Version Path
fluent-plugin-nuopenlineage-light-0.1.0 vendor/bundle/ruby/3.3.0/gems/fluentd-1.17.0-x64-mingw-ucrt/test/counter/test_error.rb
fluentd-1.16.6-x86-mingw32 test/counter/test_error.rb
fluentd-1.16.6-x64-mingw32 test/counter/test_error.rb
fluentd-1.16.6-x64-mingw-ucrt test/counter/test_error.rb
fluentd-1.16.6 test/counter/test_error.rb
fluent-plugin-openlineage-light-0.1.4 vendor/bundle/ruby/3.3.0/gems/fluentd-1.17.0-x64-mingw-ucrt/test/counter/test_error.rb
fluent-plugin-openlineage-light-0.1.3 vendor/bundle/ruby/3.3.0/gems/fluentd-1.17.0-x64-mingw-ucrt/test/counter/test_error.rb
fluent-plugin-openlineage-0.1.0 vendor/bundle/ruby/3.3.0/gems/fluentd-1.17.0-x64-mingw-ucrt/test/counter/test_error.rb
fluentd-1.17.0-x86-mingw32 test/counter/test_error.rb
fluentd-1.17.0-x64-mingw-ucrt test/counter/test_error.rb
fluentd-1.17.0-x64-mingw32 test/counter/test_error.rb
fluentd-1.17.0 test/counter/test_error.rb
fluentd-1.16.5-x64-mingw-ucrt test/counter/test_error.rb
fluentd-1.16.5-x86-mingw32 test/counter/test_error.rb
fluentd-1.16.5-x64-mingw32 test/counter/test_error.rb
fluentd-1.16.5 test/counter/test_error.rb
fluentd-1.16.4-x64-mingw-ucrt test/counter/test_error.rb
fluentd-1.16.4-x86-mingw32 test/counter/test_error.rb
fluentd-1.16.4-x64-mingw32 test/counter/test_error.rb
fluentd-1.16.4 test/counter/test_error.rb