module-puppetlabs-mysql/spec/system/mysql_server_monitor_spec.rb
Ashley Penney cc51d7ad7d Improve mysql_grant to work with IPv6.
This work attempts to improve the situation for matching IPv6
IP addresses, as the previous regex couldn't handle them properly.
2013-10-07 11:57:02 -07:00

30 lines
913 B
Ruby

require 'spec_helper_system'
describe 'mysql::server::monitor class' do
context 'should work with no errors' do
pp = <<-EOS
class { 'mysql::server': root_password => 'password' }
class { 'mysql::server::monitor':
mysql_monitor_username => 'monitoruser',
mysql_monitor_password => 'monitorpass',
mysql_monitor_hostname => 'localhost',
}
EOS
context puppet_apply(pp) do
its(:stderr) { should be_empty }
its(:exit_code) { should_not == 1 }
its(:refresh) { should be_nil }
its(:stderr) { should be_empty }
its(:exit_code) { should be_zero }
end
context 'should run mysqladmin ping with no errors' do
describe command("mysqladmin -u monitoruser -pmonitorpass -h localhost ping") do
it { should return_stdout /mysqld is alive/ }
it { should return_exit_status 0 }
end
end
end
end