2012-04-24 11:56:01 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
describe 'mysql::server::monitor' do
|
2014-07-28 07:51:22 +02:00
|
|
|
on_pe_supported_platforms(PLATFORMS).each do |pe_version,pe_platforms|
|
|
|
|
pe_platforms.each do |pe_platform,facts|
|
|
|
|
describe "on #{pe_version} #{pe_platform}" do
|
|
|
|
let(:facts) { facts }
|
|
|
|
let :pre_condition do
|
|
|
|
"include 'mysql::server'"
|
|
|
|
end
|
2013-10-07 15:55:13 +02:00
|
|
|
|
2014-07-28 07:51:22 +02:00
|
|
|
let :default_params do
|
|
|
|
{
|
|
|
|
:mysql_monitor_username => 'monitoruser',
|
|
|
|
:mysql_monitor_password => 'monitorpass',
|
|
|
|
:mysql_monitor_hostname => 'monitorhost',
|
|
|
|
}
|
|
|
|
end
|
2012-04-24 11:56:01 +02:00
|
|
|
|
2014-07-28 07:51:22 +02:00
|
|
|
let :params do
|
|
|
|
default_params
|
|
|
|
end
|
2013-10-07 15:55:13 +02:00
|
|
|
|
2014-08-08 21:27:07 +02:00
|
|
|
it { is_expected.to contain_mysql_user('monitoruser@monitorhost')}
|
2013-10-07 15:55:13 +02:00
|
|
|
|
2014-08-08 21:27:07 +02:00
|
|
|
it { is_expected.to contain_mysql_grant('monitoruser@monitorhost/*.*').with(
|
2014-07-28 07:51:22 +02:00
|
|
|
:ensure => 'present',
|
|
|
|
:user => 'monitoruser@monitorhost',
|
|
|
|
:table => '*.*',
|
|
|
|
:privileges => ["PROCESS", "SUPER"],
|
|
|
|
:require => 'Mysql_user[monitoruser@monitorhost]'
|
|
|
|
)}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2012-04-24 11:56:01 +02:00
|
|
|
end
|