Sha256: 031dab3a042b55c411712794177a0a48d8a70d08ae74154b362af5f729f79bc8

Contents?: true

Size: 1.28 KB

Versions: 2

Compression:

Stored size: 1.28 KB

Contents

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

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


  CONFIG = %[
  ]

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

  sub_test_case "configure" do
    test "tag email password aggregator_id testbed_id resource_id polling_interval" do
      d = create_driver %[
          tag test
          email hoge@foobar.com
          password login_password
          polling_interval 30
          <resource>
            path /aggregators/IOT-0/testbeds/jose/resources/hyogo001_barometer-info-value
          </resource>
          <resource>
            path /aggregators/IOT-0/testbeds/jose/resources/kyoto001_barometer-info-value
          </resource>
      ]
      assert_equal 'test', d.instance.tag
      assert_equal 'login_password', d.instance.password
      assert_equal 30, d.instance.polling_interval
      assert_equal '/aggregators/IOT-0/testbeds/jose/resources/hyogo001_barometer-info-value', d.instance.resources[0].path
      assert_equal '/aggregators/IOT-0/testbeds/jose/resources/kyoto001_barometer-info-value', d.instance.resources[1].path
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fluent-plugin-festival-0.0.3 test/plugin/test_in_festival.rb
fluent-plugin-festival-0.0.2 test/plugin/test_in_festival.rb