Fix typos in mysql::server::monitor class

* fix the dependency declaration

+ add basic tests
This commit is contained in:
François Charlier 2012-04-24 11:56:01 +02:00
parent 12a4410e63
commit 64f367fbb4
2 changed files with 19 additions and 1 deletions

View file

@ -4,7 +4,7 @@ class mysql::server::monitor (
$mysql_monitor_hostname
) {
class ['mysql::server'] -> class['mysql::monitor']
Class['mysql::server'] -> Class['mysql::server::monitor']
database_user{ "${mysql_monitor_username}@${mysql_monitor_hostname}":
password_hash => mysql_password($mysql_monitor_password),

View file

@ -0,0 +1,18 @@
require 'spec_helper'
describe 'mysql::server::monitor' do
let :facts do
{ :osfamily => 'Debian' }
end
let :pre_condition do
"include 'mysql::server'"
end
let :params do
{
:mysql_monitor_username => 'monitoruser',
:mysql_monitor_password => 'monitorpass',
:mysql_monitor_hostname => 'monitorhost'
}
end
it { should contain_database_user("monitoruser@monitorhost")}
end