From e43eee1cf1b19db9fd5d1081b0f5b15c3f82fe25 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Tue, 17 Nov 2015 09:43:41 -0800 Subject: [PATCH] Document kitchen named run lists in policyfile readme --- POLICYFILE_README.md | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/POLICYFILE_README.md b/POLICYFILE_README.md index d68fc2c66..28790a23e 100644 --- a/POLICYFILE_README.md +++ b/POLICYFILE_README.md @@ -300,9 +300,9 @@ override["same"]["with"] = "overrides" ### Testing With Test Kitchen -ChefDK now includes a Test Kitchen provisioner, which allows you to -converge VMs using Chef Client in policyfile mode, using Chef Zero to -serve cookbook data. Add the following to your `.kitchen.yml`: +ChefDK includes a Test Kitchen provisioner, which allows you to converge +VMs using Chef Client in policyfile mode, using Chef Zero to serve +cookbook data. Add the following to your `.kitchen.yml`: ```yaml provisioner: @@ -313,6 +313,35 @@ provisioner: require_chef_omnibus: true ``` +#### Using Named Run Lists With Kitchen + +As of ChefDK 0.11, the Test Kitchen provisioner supports named run +lists. In addition to testing named run lists that you are using on +production policies, you can use this feature to test different recipes +in a library cookbook in isolation. + +To use a different named run list on a per-suite basis, specify the +named run list inside a `provisioner` section, like this: + +```yaml +suites: + - name: client + provisioner: + named_run_list: test_client_recipe + - name: server + provisioner: + named_run_list: test_server_recipe +``` + +To use a named run list globally, specify it at the top level of the +provisioner section: + +```yaml +provisioner: + name: policyfile_zero + named_run_list: integration_test_run_list +``` + ## Applying the Policy on a Node On the node you with to use the policy update the client.rb to include