test-kitchen
で、nodes
の内容に応じてテストする場合の.kitchen.yml
サンプル
<%
require 'json'
def suites(&block)
Dir.glob(File.join(File.dirname(__FILE__), 'nodes', "*.json")) do |file|
suite_name = File.basename(file, '.json')
block.call(
suite_name,
JSON.parse(
open(file).read
)
)
end
end
%>
---
driver:
name: vagrant
provisioner:
name: chef_solo
platforms:
- name: centos-6.4
suites:
<%
suites do |name, json|
%>
- name: <%= name %>
run_list: <%= json["run_list"] %>
attributes: <%= json["attributes"] %>
<%
end
%>