Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
- name: Install Chef
uses: actionshub/chef-install@main
- name: Install cookbooks
run: berks install
run: chef install Policyfile.rb
8 changes: 0 additions & 8 deletions Berksfile

This file was deleted.

14 changes: 14 additions & 0 deletions Policyfile.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

name 'bind'

run_list 'test::default'

cookbook 'bind', path: '.'
cookbook 'test', path: './test/cookbooks/test'

Dir.children('./test/cookbooks/test/recipes').grep(/\.rb\z/).sort.each do |recipe|
recipe_name = File.basename(recipe, '.rb')

named_run_list recipe_name.to_sym, "test::#{recipe_name}"
end
1 change: 1 addition & 0 deletions kitchen.global.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ provisioner:
multiple_converge: <%= ENV['MULTIPLE_CONVERGE'] || 2 %>
deprecations_as_errors: true
log_level: <%= ENV['CHEF_LOG_LEVEL'] || 'auto' %>
policyfile: Policyfile.rb

verifier:
name: inspec
Expand Down
29 changes: 15 additions & 14 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ provisioner:
product_name: <%= ENV['CHEF_PRODUCT_NAME'] || 'chef' %>
product_version: <%= ENV['CHEF_VERSION'] || 'latest' %>
log_level: <%= ENV['CHEF_LOG_LEVEL'] || 'auto' %>
policyfile: Policyfile.rb

platforms:
- name: almalinux-8
Expand All @@ -33,44 +34,44 @@ verifier:

suites:
- name: default
run_list:
- recipe[test::default]
provisioner:
named_run_list: default
- name: resources
run_list:
- recipe[test]
provisioner:
named_run_list: default
verifier:
inputs:
domain: ns1.example.org
host_string: "ns1.example.org has address 1.1.1.1"
- name: chroot
run_list:
- recipe[test::chroot]
provisioner:
named_run_list: chroot
verifier:
inputs:
chroot: true
- name: views
run_list:
- recipe[test::views]
provisioner:
named_run_list: views
verifier:
inputs:
views: true
- name: logging
run_list:
- recipe[test::logging]
provisioner:
named_run_list: logging
verifier:
inputs:
logging: true
- name: linked-zones
run_list:
- recipe[test::linked_zones]
provisioner:
named_run_list: linked_zones
verifier:
inputs:
domain: ns1.example.net
host_string: "ns1.example.net has address 1.1.1.1"
linked: true
- name: zone-options
run_list:
- recipe[test::zone_options]
provisioner:
named_run_list: zone_options
verifier:
inputs:
domain: ns1.example.org
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require 'chefspec'
require 'chefspec/berkshelf'
require 'chefspec/policyfile'

RSpec.configure(&:raise_errors_for_deprecations!)

Expand Down
Loading