From 06436fd0e8cca5375ba9547573be536b7db03072 Mon Sep 17 00:00:00 2001 From: Andrea Selva Date: Thu, 30 Nov 2023 08:29:15 +0100 Subject: [PATCH] Added an assertion to a test to verify the file effectively exists and is read only (#145) --- spec/inputs/jdbc_spec.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/inputs/jdbc_spec.rb b/spec/inputs/jdbc_spec.rb index a8961b7..f9d7bb3 100755 --- a/spec/inputs/jdbc_spec.rb +++ b/spec/inputs/jdbc_spec.rb @@ -1610,6 +1610,9 @@ end it "raise a loading error" do + expect(File.exists?(invalid_driver_jar_path)).to be true + expect(FileTest.readable?(invalid_driver_jar_path)).to be false + expect { plugin.register }. to raise_error(LogStash::PluginLoadingError, /unable to load .*? from :jdbc_driver_library, file not readable/) end