Skip to content

Commit

Permalink
added mysql user /uid and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpatrick committed Oct 5, 2015
1 parent f22e574 commit 40808de
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Expand Up @@ -13,6 +13,7 @@ RUN ln -sf /usr/share/zoneinfo/EST5EDT /etc/localtime

# install packages
#RUN yum -y --disablerepo=epel --enablerepo=mysql56-community install mysql-server mysql
RUN groupadd -g 27 -r mysql && useradd -u 27 -r -g mysql mysql
RUN yum -y install Percona-Server-server-56
ADD ./root/packages.sh /packages.sh
RUN chmod 755 /packages.sh
Expand Down
18 changes: 16 additions & 2 deletions spec/localhost/Dockerfile_spec.rb
Expand Up @@ -34,10 +34,25 @@ def remove(options={}); end
end
end

describe "installs mysql group" do
describe group('mysql') do
it { should exist }
end
describe group('mysql') do
it { should have_gid 27 }
end
end

describe "installs mysql user" do
describe user('root') do
describe user('mysql') do
it { should exist }
end
describe user('mysql') do
it { should belong_to_group 'mysql' }
end
describe user('mysql') do
it { should have_uid 27 }
end
end

describe "sets the timezone to EDT" do
Expand All @@ -46,7 +61,6 @@ def remove(options={}); end
end
end


describe 'Misc Settings' do
describe command('mysql -V') do
its(:stdout) { should include "Distrib 5.6" }
Expand Down

0 comments on commit 40808de

Please sign in to comment.