2016-05-03 14:55:36 +00:00
require_relative '../jdbc_spec_helper'
2016-05-17 15:21:37 +00:00
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
2016-09-15 19:33:40 +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) "
2016-05-03 14:55:36 +00:00
end
2016-06-29 17:48:12 +00:00
2016-05-03 14:55:36 +00:00
let ( :jdbc_settings ) do
2016-05-17 15:21:37 +00:00
{
'driver_class' = > 'org.apache.derby.jdbc.EmbeddedDriver' ,
'connection_string' = > 'jdbc:derby:memory:testdb;create=true' ,
'driver_jar_path' = > ENV [ jdbc_jar_env ] ,
2016-07-07 10:00:33 +00:00
'statement' = > jdbc_statement ,
2016-06-29 17:48:12 +00:00
'max_flush_exceptions' = > 1
2016-05-03 14:55:36 +00:00
}
end
end