From 02f858e8de7ffff7451843af7af7b5ae3b39f53b Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Wed, 6 Nov 2013 11:25:29 -0700 Subject: [PATCH] install mdadm package --- manifests/init.pp | 4 ++++ spec/classes/mdadm_spec.rb | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 106988c..b4b9144 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -7,5 +7,9 @@ # include mdadm # class mdadm { + include mdadm::params + package { $mdadm::params::mdadm_package: + ensure => present, + } } diff --git a/spec/classes/mdadm_spec.rb b/spec/classes/mdadm_spec.rb index d570624..5eddf3a 100644 --- a/spec/classes/mdadm_spec.rb +++ b/spec/classes/mdadm_spec.rb @@ -2,8 +2,11 @@ describe 'mdadm', :type => :class do - describe 'for osfamily RedHat' do - it { should contain_class('mdadm') } + context 'on osfamily RedHat' do + let(:facts) {{ :osfamily => 'RedHat' }} + + it { should contain_package('mdadm').with_ensure('present') } + it { should include_class('mdadm::params') } end end