Skip to content

Commit

Permalink
prevent tests from changing config.debug flag
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvd committed Aug 10, 2017
1 parent fb7f455 commit e28ceeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 1 addition & 5 deletions logstash-core/spec/logstash/pipeline_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class TestPipeline < LogStash::Pipeline
let(:override_thread_count) { 42 }
let(:dead_letter_queue_enabled) { false }
let(:dead_letter_queue_path) { }
let(:pipeline_settings_obj) { LogStash::SETTINGS }
let(:pipeline_settings_obj) { LogStash::SETTINGS.clone }
let(:pipeline_settings) { {} }
let(:max_retry) {10} #times
let(:timeout) {120} #seconds
Expand All @@ -136,10 +136,6 @@ class TestPipeline < LogStash::Pipeline
pipeline_settings.each {|k, v| pipeline_settings_obj.set(k, v) }
end

after :each do
pipeline_settings_obj.reset
end

describe "#ephemeral_id" do
it "creates an ephemeral_id at creation time" do
pipeline = mock_pipeline_from_string("input { generator { count => 1 } } output { null {} }")
Expand Down
3 changes: 3 additions & 0 deletions logstash-core/spec/logstash/runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@
end

describe "config.debug" do
after(:each) do
LogStash::SETTINGS.set("config.debug", false)
end
it "should set 'config.debug' to false by default" do
expect(LogStash::Agent).to receive(:new) do |settings|
expect(settings.get("config.debug")).to eq(false)
Expand Down

0 comments on commit e28ceeb

Please sign in to comment.