diff --git a/spec/classes/redis_sentinel_spec.rb b/spec/classes/redis_sentinel_spec.rb index 3fc1a3b..f0c2152 100644 --- a/spec/classes/redis_sentinel_spec.rb +++ b/spec/classes/redis_sentinel_spec.rb @@ -1,88 +1,90 @@ require 'spec_helper' $expected_noparams_content = < :class do let (:facts) { debian_facts } let :pre_condition do [ 'class { redis: }' ] end describe 'without parameters' do it { should create_class('redis::sentinel') } it { should contain_file('/etc/redis/redis-sentinel.conf.puppet').with( 'ensure' => 'present', 'mode' => '0644', 'owner' => 'redis', 'content' => $expected_noparams_content ) } it { should contain_service('redis-sentinel').with( 'ensure' => 'running', 'enable' => 'true', 'hasrestart' => 'true', 'hasstatus' => 'true', ) } end describe 'with custom parameters' do let (:params) { { :auth_pass => 'password', :sentinel_bind => '1.2.3.4', :master_name => 'cow', :down_after => 6000, :log_file => '/tmp/barn-sentinel.log', :failover_timeout => 28000, :notification_script => 'bar.sh', :client_reconfig_script => 'foo.sh' } } it { should create_class('redis::sentinel') } it { should contain_file('/etc/redis/redis-sentinel.conf.puppet').with( 'content' => $expected_params_content ) } end end