mirror of
https://github.com/inspec/inspec
synced 2024-09-20 22:41:55 +00:00
add prepare cookbook for package integration test
This commit is contained in:
parent
f15d05fd22
commit
ea0814939a
3 changed files with 30 additions and 0 deletions
|
@ -4,3 +4,5 @@ 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'
|
||||
|
|
|
@ -3,3 +3,5 @@
|
|||
# author: Dominik Richter
|
||||
#
|
||||
# prepare all operating systems with the required configuration
|
||||
|
||||
include_recipe('os_prepare::package')
|
||||
|
|
26
test/integration/cookbooks/os_prepare/recipes/package.rb
Normal file
26
test/integration/cookbooks/os_prepare/recipes/package.rb
Normal file
|
@ -0,0 +1,26 @@
|
|||
# encoding: utf-8
|
||||
# author: Christoph Hartmann
|
||||
# author: Dominik Richter
|
||||
#
|
||||
# installs everything to do the package test
|
||||
|
||||
case node['platform']
|
||||
when 'ubuntu'
|
||||
include_recipe('apt')
|
||||
|
||||
package 'curl'
|
||||
when 'rhel', 'centos', 'fedora'
|
||||
include_recipe('yum')
|
||||
|
||||
# TODO: support DNF natively
|
||||
# Special care for fedora 22, since dnf is not officially supported yet
|
||||
# https://github.com/chef/chef/issues/3201
|
||||
if node['platform_version'] == 22
|
||||
execute 'dnf install -y yum'
|
||||
end
|
||||
|
||||
package 'curl'
|
||||
when 'freebsd'
|
||||
# do nothing
|
||||
# TODO: implement Freebsd packages
|
||||
end
|
Loading…
Reference in a new issue