spec/integration/logstash_forwarder_spec.rb in logstash-input-beats-2.2.7 vs spec/integration/logstash_forwarder_spec.rb in logstash-input-beats-2.2.8

- old
+ new

@@ -17,14 +17,15 @@ unless File.exist?(LSF_BINARY) raise "Cannot find `logstash-forwarder` binary in `vendor/logstash-forwarder` Did you run `bundle exec rake test:integration:setup` before running the integration suite?" end end - let(:client_wait_time) { 5 } include FileHelpers include_context "beats configuration" + let(:client_wait_time) { 5 } + # Filebeat related variables let(:cmd) { [lsf_exec, "-config", lsf_config_path] } let(:lsf_exec) { LSF_BINARY } let(:registry_file) { File.expand_path(File.join(File.dirname(__FILE__), "..", "..", ".logstash-forwarder")) } @@ -51,10 +52,11 @@ sleep(1) # let LSF start and than write the logs File.open(log_file, "a") do |f| f.write(events.join("\n") + "\n") end + sleep(1) # give some time to the clients to pick up the changes end after :each do stop_client end @@ -74,10 +76,9 @@ let(:input_config) do super.merge({ "ssl" => true, "ssl_certificate" => certificate_file, "ssl_key" => certificate_key_file, - "target_field_for_codec" => "line" }) end let(:certificate_data) { Flores::PKI.generate } let_tmp_file(:certificate_file) { certificate_data.first }