Skip to content

Commit 06436fd

Browse files
authored
Added an assertion to a test to verify the file effectively exists and is read only (#145)
1 parent 93baa6e commit 06436fd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spec/inputs/jdbc_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,6 +1610,9 @@
16101610
end
16111611

16121612
it "raise a loading error" do
1613+
expect(File.exists?(invalid_driver_jar_path)).to be true
1614+
expect(FileTest.readable?(invalid_driver_jar_path)).to be false
1615+
16131616
expect { plugin.register }.
16141617
to raise_error(LogStash::PluginLoadingError, /unable to load .*? from :jdbc_driver_library, file not readable/)
16151618
end

0 commit comments

Comments
 (0)