2016-05-17 15:21:37 +00:00
|
|
|
require_relative '../jdbc_spec_helper'
|
2016-05-03 14:28:01 +00:00
|
|
|
|
2016-05-17 15:21:37 +00:00
|
|
|
describe 'logstash-output-jdbc: mysql', if: ENV['JDBC_MYSQL_JAR'] do
|
|
|
|
include_context 'rspec setup'
|
|
|
|
include_context 'when outputting messages'
|
2016-05-03 14:28:01 +00:00
|
|
|
|
|
|
|
let(:jdbc_jar_env) do
|
|
|
|
'JDBC_MYSQL_JAR'
|
|
|
|
end
|
|
|
|
|
2016-06-29 17:48:12 +00:00
|
|
|
let(:systemd_database_service) do
|
|
|
|
'mysql'
|
|
|
|
end
|
|
|
|
|
2016-05-03 14:28:01 +00:00
|
|
|
let(:jdbc_settings) do
|
2016-05-17 15:21:37 +00:00
|
|
|
{
|
|
|
|
'driver_class' => 'com.mysql.jdbc.Driver',
|
2017-11-08 17:25:39 +00:00
|
|
|
'connection_string' => 'jdbc:mysql://localhost/logstash?user=logstash&password=logstash',
|
2016-05-17 15:21:37 +00:00
|
|
|
'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:28:01 +00:00
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|