add apache cookbook to integration tests

This commit is contained in:
Christoph Hartmann 2016-02-01 17:18:33 +01:00 committed by Dominik Richter
parent a3eda1fcee
commit 03856d6941
4 changed files with 43 additions and 3 deletions

View file

@ -4,7 +4,9 @@ maintainer 'Chef Software, Inc.'
maintainer_email 'support@chef.io'
description 'This cookbook prepares the test operating systems'
version '1.0.0'
depends 'apt'
depends 'yum'
depends 'runit'
depends 'postgresql'
depends 'httpd', '~> 0.2'

View file

@ -0,0 +1,14 @@
# encoding: utf-8
# author: Christoph Hartmann
# install apache service
case node['platform']
when 'ubuntu', 'centos', 'amazon', 'fedora'
return if node['platform_version'] == "15.10"
httpd_service 'default' do
action :create
end
end

View file

@ -4,12 +4,21 @@
#
# prepare all operating systems with the required configuration
include_recipe('os_prepare::apt')
# basic tests
include_recipe('os_prepare::file')
include_recipe('os_prepare::mount')
include_recipe('os_prepare::json_yaml_csv_ini')
include_recipe('os_prepare::service')
include_recipe('os_prepare::package')
include_recipe('os_prepare::registry_key')
include_recipe('os_prepare::service')
# configure repos, eg. nginx
include_recipe('os_prepare::apt')
# application configuration
include_recipe('os_prepare::postgres')
include_recipe('os_prepare::auditctl')
include_recipe('os_prepare::apache')
# config file parsing
include_recipe('os_prepare::json_yaml_csv_ini')

View file

@ -0,0 +1,15 @@
# encoding: utf-8
if os.linux?
# direct access to params of apache conf
describe apache_conf do
its('LogLevel') { should eq 'warn' }
its('MaxKeepAliveRequests') { should eq '100' }
end
# only read one param
describe apache_conf.params('LogLevel') do
it { should include 'warn' }
end
end