Skip to content

Commit

Permalink
Added an assertion to a test to verify the file effectively exists an…
Browse files Browse the repository at this point in the history
…d is read only (#145)
  • Loading branch information
andsel authored Nov 30, 2023
1 parent 93baa6e commit 06436fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/inputs/jdbc_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 06436fd

Please sign in to comment.