spec/inputs/unix_spec.rb in logstash-input-unix-3.0.2 vs spec/inputs/unix_spec.rb in logstash-input-unix-3.0.3
- old
+ new
@@ -10,9 +10,22 @@
it "should register without errors" do
plugin = LogStash::Plugin.lookup("input", "unix").new({ "path" => tempfile.path, "force_unlink" => true })
expect { plugin.register }.to_not raise_error
end
+ describe "when mode is client" do
+
+ let(:mode) { "client" }
+
+ context "if socket_not_present_retry_interval_seconds is out of bounds" do
+ it "should fallback to default value" do
+ plugin = LogStash::Plugin.lookup("input", "unix").new({ "path" => tempfile.path, "force_unlink" => true, "mode" => mode, "socket_not_present_retry_interval_seconds" => -1 })
+ plugin.register
+ expect(plugin.instance_variable_get(:@socket_not_present_retry_interval_seconds)).to be 5
+ end
+ end
+ end
+
describe "when interrupting the plugin" do
context "#server" do
it_behaves_like "an interruptible input plugin" do
let(:config) { { "path" => tempfile.path, "force_unlink" => true } }