Skip to content

Commit

Permalink
Merge pull request #169 from artem-sidorenko/apt-yum
Browse files Browse the repository at this point in the history
Removal of apt/yum cookbooks from tests
  • Loading branch information
atomic111 authored Feb 16, 2017
2 parents e03f161 + 56972dd commit b19230f
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .kitchen.vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ verifier:
suites:
- name: default
run_list:
- recipe[test]
- recipe[ssh-hardening]
verifier:
inspec_tests:
Expand All @@ -44,6 +45,7 @@ suites:
vagrantfiles:
- test/fixtures/vagrantfiles/enforce_selinux.rb
run_list:
- recipe[test]
- recipe[ssh-hardening]
attributes:
ssh-hardening:
Expand Down
5 changes: 2 additions & 3 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ platforms:
suites:
- name: default
run_list:
- recipe[apt]
- recipe[yum]
- recipe[ssh-hardening::default]
- recipe[test]
- recipe[ssh-hardening]
verifier:
inspec_tests:
- https://github.com/dev-sec/tests-ssh-hardening
5 changes: 3 additions & 2 deletions Berksfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ source 'https://supermarket.chef.io'

metadata

cookbook 'apt'
cookbook 'yum'
group :test do
cookbook 'test', path: 'test/fixtures/cookbooks/test'
end
9 changes: 9 additions & 0 deletions test/fixtures/cookbooks/test/metadata.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name 'test'
maintainer 'Dominik Richter'
maintainer_email '[email protected]'
license 'Apache 2.0'
description 'This cookbook is used for testing purposes'
long_description 'This cookbook is used for testing purposes'
version '0.0.1'

depends 'compat_resource', '>= 12.16.3'
25 changes: 25 additions & 0 deletions test/fixtures/cookbooks/test/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# encoding: utf-8
#
# Cookbook Name:: test
# Recipe:: default.rb
#
# Copyright 2017, Artem Sidorenko
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

if node['platform_family'] == 'debian'
apt_update 'update-apt-cache' do
action :update
end
end

0 comments on commit b19230f

Please sign in to comment.