Sha256: e489afa3b83557368efea7af54c2596877ce056682913f1bd088371976c96ce2
Contents?: true
Size: 1.22 KB
Versions: 2
Compression:
Stored size: 1.22 KB
Contents
require 'helper' class BoundioOutputTest < Test::Unit::TestCase def setup Fluent::Test.setup end CONFIG = %[ user_serial_id YOUR_BOUNDIO_USER_SERIAL_ID api_key YOUR_BOUNDIO_API_KEY user_key YOUR_BOUNDIO_USER_KEY default_number 09012345678 ] def create_driver(conf=CONFIG,tag='test') Fluent::Test::OutputTestDriver.new(Fluent::BoundioOutput, tag).configure(conf) end def test_configure assert_raise(Fluent::ConfigError) { d = create_driver('') } d = create_driver %[ user_serial_id YOUR_BOUNDIO_USER_SERIAL_ID api_key YOUR_BOUNDIO_API_KEY user_key YOUR_BOUNDIO_USER_KEY default_number 09012345678 ] d.instance.inspect assert_equal 'YOUR_BOUNDIO_USER_SERIAL_ID', d.instance.user_serial_id assert_equal 'YOUR_BOUNDIO_API_KEY', d.instance.api_key assert_equal 'YOUR_BOUNDIO_USER_KEY', d.instance.user_key assert_equal '09012345678', d.instance.default_number end def test_emit d1 = create_driver(CONFIG, 'input.access') time = Time.parse("2012-01-02 13:14:15").to_i d1.run do d1.emit({'message' => 'sample message'}) end emits = d1.emits assert_equal 0, emits.length end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fluent-plugin-boundio-0.0.2 | test/plugin/test_out_boundio.rb |
fluent-plugin-boundio-0.0.1 | test/plugin/test_out_boundio.rb |