Skip to content

Commit

Permalink
Merge pull request #73 from scassiba/fix_redhat_support
Browse files Browse the repository at this point in the history
Fix directory permissions regression
  • Loading branch information
sinfomicien committed Jul 28, 2015
2 parents 5094361 + d9a0568 commit a22d1cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions recipes/_redhat_server_native.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
node.set['mariadb']['mysqld']['service_name'] = service_name\
unless service_name.nil?

package 'mariadb-server' do
action :install
notifies :enable, 'service[mysql]'
end

directory '/var/log/mysql' do
action :create
user 'mysql'
group 'mysql'
mode '0755'
end

package 'mariadb-server' do
action :install
notifies :enable, 'service[mysql]'
notifies :start, 'service[mysql]', :immediately
notifies :run, 'execute[change first install root password]', :immediately
end
Expand Down
5 changes: 4 additions & 1 deletion spec/centos_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,16 @@

it 'Install os shipped package' do
expect(chef_run).to install_package('mariadb-server')
expect(os_package).to notify('service[mysql]').to(:start).immediately
end

it 'Create Log directory' do
expect(chef_run).to create_directory('/var/log/mysql')
end

it 'Does not restart mysql service' do
expect(chef_run).to_not restart_service('mysql')
end

it 'Server service with the correct name' do
expect(os_service.service_name).to eq 'mariadb'
end
Expand Down

0 comments on commit a22d1cb

Please sign in to comment.