Search code examples
rubyrubygemschef-infratest-kitchenserverspec

How to specify version of specinfra for test-kitchen verify command?


Last version of https://github.com/serverspec/specinfra is broken (https://github.com/serverspec/specinfra/pull/229).

so when I execute:

kitchen verify

it doesn't verify and just throw some errors.

So I thought - How to specify some particular version of specinfra gem for test-kitchen?

then I could just specify previous version that worked and continue development.

I'm sure that this particular error will be fixed, but it would be great to know how to change versions of gems that test-kitchen uses.

Because it will happen again.


Solution

  • Unfortunately not super easily. The actual serverspec gem install is done on the target system via busser-serverspec. This code calls RubyGems directly, so it is hard to override. If I'm reading that #test hook correctly you may be able to include a Gemfile in your suite files that pulls in specinfra from git after the initial install.