Skip to content

Commit dcae6f5

Browse files
committed
Fixed failed test
1 parent 180d597 commit dcae6f5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

logstash-core/spec/logstash/settings/setting_with_deprecated_alias_spec.rb

+5-4
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,14 @@
147147
let(:old_value) { "iron man" }
148148
let(:canonical_name) { "iron.setting" }
149149
let(:deprecated_name) { "iron.oxide.setting" }
150-
subject { LogStash::Setting::String.new(canonical_name, old_value, true) }
150+
subject { LogStash::Setting::StringSetting.new(canonical_name, old_value, true) }
151151

152152
it 'logs a deprecation warning with target remove version' do
153153
settings.set(deprecated_name, new_value)
154-
expect(LogStash::Settings.deprecation_logger).to have_received(:deprecated)
155-
.with(a_string_including(deprecated_name))
156-
.with(a_string_including("version 9"))
154+
settings.get_setting(deprecated_name).observe_post_process
155+
expect(events.length).to be 2
156+
expect(events[1]).to include(deprecated_name)
157+
expect(events[1]).to include("version 9")
157158
end
158159
end
159160
describe "java boolean setting" do

0 commit comments

Comments
 (0)