Sha256: 39268b6f51d5e19e5c50fff766d7e560620bddfed8189bc9541cc23217da9156

Contents?: true

Size: 686 Bytes

Versions: 8

Compression:

Stored size: 686 Bytes

Contents

require_relative '../helper'
require 'fluent/test/driver/input'
require 'fluent/plugin/in_mqtt'

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


  CONFIG = %[
  ]

  def create_driver(conf = CONFIG, opts = {}) 
    Fluent::Test::Driver::Input.new(Fluent::Plugin::MqttInput, opts: opts).configure(conf)
  end

  sub_test_case "configure" do
    test "host and port" do
      d = create_driver %[
          host 127.0.0.1
          port 1300
          <parse>
            @type json
            time_format %FT%T%:z
          </parse>
      ]
      assert_equal '127.0.0.1', d.instance.host
      assert_equal 1300, d.instance.port
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fluent-plugin-mqtt-io-0.3.8 test/plugin/test_in_mqtt.rb
fluent-plugin-mqtt-io-0.3.7 test/plugin/test_in_mqtt.rb
fluent-plugin-mqtt-io-0.3.6 test/plugin/test_in_mqtt.rb
fluent-plugin-mqtt-io-0.3.5 test/plugin/test_in_mqtt.rb
fluent-plugin-mqtt-io-0.3.4 test/plugin/test_in_mqtt.rb
fluent-plugin-mqtt-io-0.3.3 test/plugin/test_in_mqtt.rb
fluent-plugin-mqtt-io-0.3.1 test/plugin/test_in_mqtt.rb
fluent-plugin-mqtt-io-0.3.0 test/plugin/test_in_mqtt.rb