Skip to main content

Run Test Kitchen

Example kitchen.yaml for Chef Infra Client 19

The following kitchen.yaml file example defines tests that run in Chef Infra Client 19:

---
driver:
  name: dokken
  privileged: true
  chef_version: 19.2.12

provisioner:
  name: dokken

transport:
  name: dokken

verifier:
  name: inspec

platforms:
  - name: ubuntu-20.04
  - name: centos-8

suites:
  - name: default
    run_list:
      - "cookbook"
    verifier:
      inspec_tests:
        - test/integration/default

Provision earlier versions of Chef Infra Client

To provision containers to use Chef Infra Client version 18 or earlier, modify the driver configuration in the kitchen.yml file as shown below. Set chef_image to chef/chef and set the version of Infra Client in chef_version.

driver:
  name: dokken
  privileged: true
  chef_version: 18.3.0
  chef_image: "chef/chef"

Run converge and verify tests

The Test Kitchen documentation describes the process for creating converge and verify tests. The Dokken driver documentation is in the kitchen-dokken GitHub repository.

Habitat-based changes

The Chef Infra Client 19 and above is accessible using Habitat instead of the public Omnitruck APIs. Consequently, we’ve updated the provisioner to facilitate the installation of the Habitat-based Chef Infra Client, including passing through the license required from kitchen.yml file.

Thank you for your feedback!

×