Use Gem version of Chef with Test Kitchen


#1

I seem to have come across an issue with Test Kitchen in which it seems to
assume the location of the chef-client executable is in
/opt/chef/bin/chef-client despite setting the provisioner value
"chef_omnibus_root: false" - I dug around in the test-kitchen code a bit,
but its not completely apparent to me how and where this path is getting
set. Is there a way to override this?

Thanks!

-Ryan H.


#2

Try setting ruby_bindir: ‘/path/to/folder/containing/chef/client’ in your
provisioner section to tell it where to find the chef binary. I haven’t
tested it with chef but I would expect it works (seems to be a setting in
the main testkitchen code).

On Mon, Aug 24, 2015 at 12:12 AM, Ryan Hass ryan@invalidchecksum.net
wrote:

I seem to have come across an issue with Test Kitchen in which it seems to
assume the location of the chef-client executable is in
/opt/chef/bin/chef-client despite setting the provisioner value
"chef_omnibus_root: false" - I dug around in the test-kitchen code a bit,
but its not completely apparent to me how and where this path is getting
set. Is there a way to override this?

Thanks!

-Ryan H.


#3

Cameron is correct. This is taken from one of our .kitchen.yml files because it is needed when we test with SmartOS:

platforms:

Notice that we also put it under ‘busser’ to allow ServerSpec to run.

On Aug 24, 2015, at 1:12 AM, Ryan Hass ryan@invalidchecksum.net wrote:

I seem to have come across an issue with Test Kitchen in which it seems to assume the location of the chef-client executable is in /opt/chef/bin/chef-client despite setting the provisioner value “chef_omnibus_root: false” - I dug around in the test-kitchen code a bit, but its not completely apparent to me how and where this path is getting set. Is there a way to override this?

Thanks!

-Ryan H.