# simple ingest() for wendelin tests # (without need for providing streamtool uri, credentials, etc) # 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}, log) def ingest(input_stream_ref, data_chunk) $wendelin.ingest(input_stream_ref, data_chunk) end