Fix typos in mysql::server::monitor class
* fix the dependency declaration + add basic tests
This commit is contained in:
parent
12a4410e63
commit
64f367fbb4
2 changed files with 19 additions and 1 deletions
|
@ -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),
|
||||
|
|
18
spec/classes/mysql_server_monitor_spec.rb
Normal file
18
spec/classes/mysql_server_monitor_spec.rb
Normal 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
|
Loading…
Reference in a new issue