Merge "Add tests for selinux"

This commit is contained in:
Jenkins 2015-10-02 07:43:24 +00:00 committed by Gerrit Code Review
commit fc3c6089f9
2 changed files with 26 additions and 0 deletions

View File

@ -190,4 +190,19 @@ describe 'puppet-cgit module', :if => ['fedora', 'redhat'].include?(os[:family])
its(:content) { should include 'Listen 443' }
end
end
describe 'selinux' do
describe command("semanage boolean -l | grep '^httpd_enable_cgi'") do
its(:stdout) { should match(/^httpd_enable_cgi.*\(on , on\)/) }
end
describe command("semanage port -l | grep '^http_port_t'") do
its (:stdout) { should match(/^http_port_t.*\b80,/) }
its (:stdout) { should match(/^http_port_t.*\b443,/) }
end
describe command("semanage port -l | grep '^git_port_t'") do
its(:stdout) { should match(/^git_port_t.*\b9418,/) }
end
end
end

View File

@ -191,4 +191,15 @@ describe 'puppet-cgit module begind proxy', :if => ['fedora', 'redhat'].include?
its(:content) { should include 'Listen 4443' }
end
end
describe 'selinux' do
describe command("semanage port -l | grep '^http_port_t'") do
its(:stdout) { should match(/^http_port_t.*\b8080,/) }
its(:stdout) { should match(/^http_port_t.*\b4443,/) }
end
describe command("semanage port -l | grep '^git_port_t'") do
its(:stdout) { should match(/^git_port_t.*\b29418,/) }
end
end
end