- Notifications
You must be signed in to change notification settings - Fork 65
Mark previously deprecated SSL settings as obsolete #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -210,7 +210,7 @@ | |
| context "given 'at' expression" do | ||
| let(:opts) { | ||
| { | ||
| "schedule" => { "at" => "2000-01-01 00:05:00 +0000"}, | ||
| "schedule" => { "at" => "2000-01-01 00:15:00 +0000"}, | ||
| "urls" => default_urls, | ||
| "codec" => "json", | ||
| "metadata_target" => metadata_target | ||
| | @@ -219,7 +219,7 @@ | |
| | ||
| before do | ||
| Timecop.travel(Time.new(2000,1,1,0,0,0,'+00:00')) | ||
| Timecop.scale (60 * 5) / 2 | ||
| Timecop.scale (60) | ||
| ||
| end | ||
| | ||
| after do | ||
| | @@ -228,7 +228,7 @@ | |
| | ||
| it "should run at the schedule" do | ||
| run_plugin_and_yield_queue(plugin, sleep: 4.1) do |queue| | ||
| try(10) { expect(queue.size).to eq(1) } | ||
| try(30) { expect(queue.size).to eq(1) } | ||
| end | ||
| end | ||
| end | ||
| | @@ -557,4 +557,34 @@ def run_plugin_and_yield_queue(plugin, sleep: nil) | |
| let(:allowed_lag) { 10 } # CI: wait till scheduler shuts down | ||
| end | ||
| end | ||
| | ||
| describe "obsolete settings" do | ||
| let(:default_url) { "http://localhost:2322" } | ||
| let(:config) { | ||
| { | ||
| "schedule" => { "cron" => "0 0 0 0 0 UTC" }, | ||
| "urls" => default_urls, | ||
| "codec" => "json" | ||
| } | ||
| } | ||
| [{:name => 'cacert', :canonical_name => 'ssl_certificate_authorities'}, | ||
| {:name => 'client_cert', :canonical_name => 'ssl_certificate'}, | ||
| {:name => 'client_key', :canonical_name => 'ssl_key'}, | ||
| {:name => "keystore", :canonical_name => 'ssl_keystore_path'}, | ||
| {:name => 'truststore', :canonical_name => 'ssl_truststore_path'}, | ||
| {:name => "keystore_password", :canonical_name => "ssl_keystore_password"}, | ||
| {:name => 'truststore_password', :canonical_name => "ssl_truststore_password"}, | ||
| {:name => "keystore_type", :canonical_name => "ssl_keystore_type"}, | ||
| {:name => 'truststore_type', :canonical_name => 'ssl_truststore_type'} | ||
| ].each do |settings| | ||
| context "with option #{settings[:name]}" do | ||
| let(:obsolete_config) { config.merge(settings[:name] => 'test_value') } | ||
| | ||
| it "emits an error about the setting `#{settings[:name]}` now being obsolete and provides guidance to use `#{settings[:canonical_name]}`" do | ||
| error_text = /The setting `#{settings[:name]}` in plugin `http_poller` is obsolete and is no longer available. Use `#{settings[:canonical_name]}` instead/i | ||
| expect { LogStash::Inputs::HTTP_Poller.new(obsolete_config)}.to raise_error LogStash::ConfigurationError, error_text | ||
| end | ||
| end | ||
| end | ||
| end | ||
| end | ||
Uh oh!
There was an error while loading. Please reload this page.