logstash-output-jdbc/spec/outputs/jdbc_sqlite_spec.rb

27 lines
673 B
Ruby
Raw Normal View History

require_relative '../jdbc_spec_helper'
2016-05-03 14:28:01 +00:00
describe 'logstash-output-jdbc: sqlite', if: ENV['JDBC_SQLITE_JAR'] do
JDBC_SQLITE_FILE = '/tmp/logstash_output_jdbc_test.db'.freeze
2016-05-03 14:28:01 +00:00
before(:context) do
File.delete(JDBC_SQLITE_FILE) if File.exist? JDBC_SQLITE_FILE
2016-05-03 14:28:01 +00:00
end
include_context 'rspec setup'
include_context 'when outputting messages'
2016-05-03 14:28:01 +00:00
let(:jdbc_jar_env) do
'JDBC_SQLITE_JAR'
end
let(:jdbc_settings) do
{
'driver_class' => 'org.sqlite.JDBC',
'connection_string' => "jdbc:sqlite:#{JDBC_SQLITE_FILE}",
'driver_jar_path' => ENV[jdbc_jar_env],
'statement' => jdbc_statement,
'max_flush_exceptions' => 1
2016-05-03 14:28:01 +00:00
}
end
end