test-kitchen / kitchen-dokken

Test Kitchen driver/provisioner for lightning faster Chef Infra cookbook testing with Docker
Other
196 stars 91 forks source link

Test kitchen ignores chef_version: latest with centos-7 image #296

Closed cnaude closed 1 year ago

cnaude commented 1 year ago

:ghost: Brief Description

When setting chef_version to latest in the kitchen.yml with the centos-7 dokken image it does not install the latest chef client. It currently is only running chef-16. If I set chef_version to 18 then it installs chef-18 and runs as expected.

Version

chef-workstation-23.7.1042-1

Environment

Test kitchen on Ubuntu 22.04.

Scenario

I need chef_version to actually pull the latest version of the client when it is set to latest.

Steps to Reproduce

Create cookbook with the following kitchen.yml file.

---
driver:
  name: dokken
  chef_version: latest # or 16 or 16.0 or 16.0.300 or current

transport:
  name: dokken

provisioner:
  name: dokken

verifier:
  name: inspec

platforms:
- name: centos-7
  driver:
    image: dokken/centos-7

suites:
  - name: default
    run_list:
    - recipe[hello_dokken::default]

Run kitchen test

Expected Result

Chef Infra Client, version 18.2.7

Actual Result

Starting Chef Infra Client, version 16.16.13
cnaude commented 1 year ago

This was just a caching issue. Clearing my docker image cache forced it to pull down a new dokken/centos-7 image which worked correctly.