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

26 lines
865 B
Ruby
Raw Normal View History

2016-05-03 14:55:36 +00:00
require_relative '../jdbc_spec_helper'
describe 'logstash-output-jdbc: derby', if: ENV['JDBC_DERBY_JAR'] do
include_context 'rspec setup'
include_context 'when initializing'
include_context 'when outputting messages'
2016-05-03 14:55:36 +00:00
let(:jdbc_jar_env) do
'JDBC_DERBY_JAR'
end
let(:jdbc_create_table) do
2017-11-08 13:24:23 +00:00
"CREATE table #{jdbc_test_table} (created_at timestamp not null, message varchar(512) not null, message_sprintf varchar(512) not null, static_int int not null, static_bit boolean not null, static_bigint bigint not null, static_float float not null)"
2016-05-03 14:55:36 +00:00
end
2016-05-03 14:55:36 +00:00
let(:jdbc_settings) do
{
'driver_class' => 'org.apache.derby.jdbc.EmbeddedDriver',
'connection_string' => 'jdbc:derby:memory:testdb;create=true',
'driver_jar_path' => ENV[jdbc_jar_env],
'statement' => jdbc_statement,
'max_flush_exceptions' => 1
2016-05-03 14:55:36 +00:00
}
end
end