module-puppetlabs-mysql/spec/acceptance/mysql_server_monitor_spec.rb
Hunter Haugen 0aed9e07f7 Adding beaker-rspec test files
These tests are more or less parity with the rspec-system tests, though
dependent on a few patches that still have to make it into beaker and
beaker-rspec
2013-12-06 14:52:41 -08:00

22 lines
702 B
Ruby

require 'spec_helper_acceptance'
describe 'mysql::server::monitor class' do
it '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
apply_manifest(pp, :catch_failures => true)
expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
end
it 'should run mysqladmin ping with no errors' do
expect(shell("mysqladmin -u monitoruser -pmonitorpass -h localhost ping").stdout).to match(/mysqld is alive/)
end
end