Skip to content

Commit c9ff6fd

Browse files
committed
Added mathing of custom pipeline id
1 parent fff140b commit c9ff6fd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

qa/integration/specs/pipeline_id_log_spec.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,18 @@
3131
let(:config) { @fixture.config("root") }
3232

3333
it "should write logs to a new dir" do
34+
pipeline_name = "custom_pipeline"
3435
settings = {
3536
"path.logs" => temp_dir,
37+
"pipeline.id" => pipeline_name,
3638
"slowlog.threshold.warn" => "500ms"
3739
}
3840
IO.write(@ls.application_settings_file, settings.to_yaml)
3941
@ls.spawn_logstash("-w", "1" , "-e", config)
4042
@ls.wait_for_logstash
4143
sleep 2 until @ls.exited?
42-
pipelinelog_file = "#{temp_dir}/logstash-plain.log"
43-
expect(File.exists?(pipelinelog_file)).to be true
44-
expect(IO.read(pipelinelog_file).split("\n").size).to be >= 1
44+
plainlog_file = "#{temp_dir}/logstash-plain.log"
45+
expect(File.exists?(plainlog_file)).to be true
46+
expect(IO.read(plainlog_file) =~ /\[logstash.javapipeline\s*\]\[#{pipeline_name}\]/).to be > 0
4547
end
4648
end

0 commit comments

Comments
 (0)