# 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' # 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}) def ingest(input_stream_ref, data_chunk) $wendelin.ingestDataChunk(input_stream_ref, data_chunk) end