Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix directory permissions regression #73

Merged
merged 1 commit into from
Jul 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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