test/wendelin_test.rb in fluent-plugin-wendelin-0.1 vs test/wendelin_test.rb in fluent-plugin-wendelin-0.2
- old
+ new
@@ -3,19 +3,23 @@
# load wendelin_clinet.rb from in-tree
here = File.dirname(__FILE__)
$LOAD_PATH << File.expand_path(File.join(here, '../lib'))
require 'fluent/plugin/wendelin_client'
+require 'fluent/log'
+require 'fluent/engine' # for log
+log = Fluent::Log.new(out=STDERR, level=Fluent::Log::LEVEL_TRACE)
+
# FIXME hardcoded
$user = 'user'
$password = 'password'
# FIXME hardcoded & shortcut for tests
$erp5 = "https://example.com/erp5" # erp5 root
$streamtool = "#{$erp5}/portal_input_data_streams" # where Input Stream Tool is mounted
-$wendelin = WendelinClient.new($streamtool, {'user' => $user, 'password' => $password})
+$wendelin = WendelinClient.new($streamtool, {'user' => $user, 'password' => $password}, log)
def ingest(input_stream_ref, data_chunk)
$wendelin.ingest(input_stream_ref, data_chunk)
end