2012-04-24 11:56:01 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
describe 'mysql::server::monitor' do
|
|
|
|
let :facts do
|
2013-07-08 11:49:30 +02:00
|
|
|
{ :osfamily => 'Debian', :root_home => '/root' }
|
2012-04-24 11:56:01 +02:00
|
|
|
end
|
|
|
|
let :pre_condition do
|
|
|
|
"include 'mysql::server'"
|
|
|
|
end
|
2013-10-07 15:55:13 +02:00
|
|
|
|
|
|
|
let :default_params do
|
2012-04-24 11:56:01 +02:00
|
|
|
{
|
2013-10-07 15:55:13 +02:00
|
|
|
:mysql_monitor_username => 'monitoruser',
|
|
|
|
:mysql_monitor_password => 'monitorpass',
|
|
|
|
:mysql_monitor_hostname => 'monitorhost',
|
2012-04-24 11:56:01 +02:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2013-10-07 15:55:13 +02:00
|
|
|
let :params do
|
|
|
|
default_params
|
|
|
|
end
|
|
|
|
|
2013-08-18 02:54:02 +02:00
|
|
|
it { should contain_mysql_user('monitoruser@monitorhost')}
|
2013-10-07 15:55:13 +02:00
|
|
|
|
|
|
|
it { should contain_mysql_grant('monitoruser@monitorhost/*.*').with(
|
|
|
|
:ensure => 'present',
|
|
|
|
:user => 'monitoruser@monitorhost',
|
|
|
|
:table => '*.*',
|
|
|
|
:privileges => ["PROCESS", "SUPER"],
|
|
|
|
:require => 'Mysql_user[monitoruser@monitorhost]'
|
|
|
|
)}
|
2012-04-24 11:56:01 +02:00
|
|
|
end
|