Skip to content

Commit

Permalink
Fixing debian-9 CI tests
Browse files Browse the repository at this point in the history
The package lists of debian 9 DO image are not full/complete,
we updating them via test cookbook

Signed-off-by: Artem Sidorenko <[email protected]>
  • Loading branch information
artem-sidorenko committed Jul 3, 2018
1 parent 5fde201 commit ad74bb4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ verifier:
suites:
- name: default
run_list:
- recipe[test]
- recipe[os-hardening::default]
- name: modules_disabled
run_list:
- recipe[test]
- recipe[os-hardening::default]
attributes:
os-hardening:
Expand All @@ -56,6 +58,7 @@ suites:
kernel_modules_disabled: 1
- name: selinux_enabled
run_list:
- recipe[test]
- recipe[os-hardening::default]
includes:
- centos-7
Expand Down
4 changes: 4 additions & 0 deletions Berksfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@

source 'https://supermarket.chef.io'

group :test do
cookbook 'test', path: 'test/fixtures/cookbooks/test'
end

metadata
7 changes: 7 additions & 0 deletions test/fixtures/cookbooks/test/metadata.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name 'test'
maintainer 'Artem Sidorenko'
maintainer_email '[email protected]'
license 'Apache-2.0'
description 'Test preparation cookbook'
long_description 'Test preparation cookbook'
version '0.1.0'
13 changes: 13 additions & 0 deletions test/fixtures/cookbooks/test/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# Cookbook Name:: test
# Recipe:: default
#

# We use this test cookbook to initialize the test environment

if node['platform_family'] == 'debian'
# Run apt-get update if we are on debian, some images/boxes do not have full package lists
execute 'apt update' do
command 'apt-get update'
end
end

0 comments on commit ad74bb4

Please sign in to comment.