module-puppetlabs-mysql/spec/classes/mysql_server_monitor_spec.rb
David Schmitt 6527a3aa22 (MAINT) switch to rspec-puppet-facts
Switching out the puppet version, as puppet_facts does, does not work,
as this will confuse code that wants to use version-dependent features.

Instead this uses rspec-puppet-facts, which doesn't touch the puppet
version.
2015-10-13 11:29:42 +01:00

38 lines
972 B
Ruby

require 'spec_helper'
describe 'mysql::server::monitor' do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) {
facts.merge({
:root_home => '/root',
})
}
let :pre_condition do
"include 'mysql::server'"
end
let :default_params do
{
:mysql_monitor_username => 'monitoruser',
:mysql_monitor_password => 'monitorpass',
:mysql_monitor_hostname => 'monitorhost',
}
end
let :params do
default_params
end
it { is_expected.to contain_mysql_user('monitoruser@monitorhost')}
it { is_expected.to contain_mysql_grant('monitoruser@monitorhost/*.*').with(
:ensure => 'present',
:user => 'monitoruser@monitorhost',
:table => '*.*',
:privileges => ["PROCESS", "SUPER"],
:require => 'Mysql_user[monitoruser@monitorhost]'
)}
end
end
end