Skip to content

Commit

Permalink
Merge pull request #301 from shortdudey123/cleanup_warnings
Browse files Browse the repository at this point in the history
Cleanup warnings
  • Loading branch information
brianbianco authored Feb 2, 2017
2 parents 3373245 + 6f6a2d5 commit 63af45a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion providers/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def configure
# Create the owner of the redis data directory
user current['user'] do
comment 'Redis service account'
supports manage_home: true
manage_home true
home current['homedir']
shell current['shell']
system current['systemuser']
Expand Down
2 changes: 1 addition & 1 deletion providers/sentinel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def configure
# Create the owner of the redis data directory
user current['user'] do
comment 'Redis service account'
supports manage_home: true
manage_home true
home current['homedir']
shell current['shell']
system current['systemuser']
Expand Down
2 changes: 1 addition & 1 deletion recipes/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@
end
end

node.set['redisio']['servers'] = redis_instances
node.normal['redisio']['servers'] = redis_instances
4 changes: 2 additions & 2 deletions recipes/enable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

redis = node['redisio']

execute 'reload-systemd' do
execute 'reload-systemd-enable' do
command '/usr/bin/systemctl daemon-reload'
only_if { node['redisio']['job_control'] == 'systemd' }
action :nothing
Expand All @@ -41,7 +41,7 @@
else
link "/etc/systemd/system/multi-user.target.wants/redis@#{server_name}.service" do
to '/usr/lib/systemd/system/redis@.service'
notifies :run, 'execute[reload-systemd]', :immediately
notifies :run, 'execute[reload-systemd-enable]', :immediately
end
end
end
4 changes: 2 additions & 2 deletions recipes/sentinel_enable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
]
end

execute 'reload-systemd' do
execute 'reload-systemd-sentinel' do
command '/usr/bin/systemctl daemon-reload'
only_if { node['redisio']['job_control'] == 'systemd' }
action :nothing
Expand All @@ -52,7 +52,7 @@
else
link "/etc/systemd/system/multi-user.target.wants/redis-sentinel@#{sentinel_name}.service" do
to '/usr/lib/systemd/system/redis-sentinel@.service'
notifies :run, 'execute[reload-systemd]', :immediately
notifies :run, 'execute[reload-systemd-sentinel]', :immediately
end
end
end
4 changes: 2 additions & 2 deletions test/unit/spec/sentinel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

it 'creates a specified sentinel instance' do
chef_run = ChefSpec::SoloRunner.new do |node|
node.set['redisio']['sentinels'] = [
node.override['redisio']['sentinels'] = [
{
'sentinel_bind' => '0.0.0.0',
'sentinel_port' => '1234',
Expand All @@ -59,7 +59,7 @@

it 'should not create a sentinel instance' do
chef_run = ChefSpec::SoloRunner.new do |node|
node.set['redisio']['sentinels'] = []
node.override['redisio']['sentinels'] = []
end.converge(*recipes) # *splat operator for array to vararg
expect(chef_run).to run_redisio_sentinel('redis-sentinels').with(
sentinels: []
Expand Down

0 comments on commit 63af45a

Please sign in to comment.