Search code examples
chef-infratest-kitchen

How to replace a bundled test-kitchen driver with a local version


I'm trying to test a change to the kitchen-hyperv driver locally, but can't figure out how I replace the driver bundled in test-kitchen with my local bits.

I've tried to install my local built kitchen-hyperv gem, but test-kitchen still uses its bundled version.

I'm not able to find any decriptions of how to replace an internal bundled test/kitchen driver, no matter what I search for.


Solution

  • Unfortunately this isn't really doable. You can do a one-off by installing the new gem into ChefDK's ruby environment and then opening the kitchen executable and editing the appropriate gem line(s). There is also the slightly more automated appbundle-updater tool. But needless to say, we as a community don't really support either very much and you can easily leave your DK as a non-functional mess. If doing local development, it is often required that you stop using ChefDK entirely and instead use a more traditional bundler-based workflow. However this also requires you to take responsibility for some bits of environment management and generally requires more Ruby knowledge than ChefDK normally would.