New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility to lock down versions of gems #515
Comments
Hello, I just wanted to see if I could find a way to achieve what you are asking for. So far, if you add in your busser:
version: busser@0.6.0 and rename your choice of plugin to also include the version like the following:
Test-kitchen will install the busser version you set, and then busser will install the plugin version as well. If you dig through the code, you can actually see that the names are being split by '@' to look for a version :) If you want to take it even further, you can also add a Gemfile if the plugin supports it and install specific versions.
I think a cleaner way would be to make busser plugin versions against an attribute in the .kitchen.yml. For example: busser:
version: busser@0.6.0
plugins: ['serverspec@0.2.6', 'minitest@x', 'bats@x', 'rspec@x'] Or maybe even make the busser-plugins set in .kitchen.yml have higher precedence than what busser discovers on its own. |
This should be documented so it is clear to users what the capabilities are. CHEF maintains documentation about the |
The issue referenced above to track my comment a few minutes ago 😄 |
Renaming the plugin directory didn't work for me:
It seems that while the correct plugin version is loaded, it can't find the tests because the uploaded tests are in |
@ritterwolf The version of serverspec 0.2.6 uses rspec 3 which requires the --default-path to be set in order to find the tests. Since this isn't being passed in (and causing the bug which was fixed recently), rspec is looking for a However, your point still stands as the tests are not in @jtimberman I would like to note that the plugins array for the .kitchen.yml has not been implemented and does not work. I suggested it as an idea and working on it. Having this would actually fix the issue from @ritterwolf |
@ritterwolf A workaround for now is to use busser-rspec instead of busser-serverspec, and create a Gemfile that includes the correct version of the serverspec gem you want.
|
@joventuraz you are a lifesaver. Using rspec and a Gemfile seems to have done the trick for me. |
@ritterwolf happy to help! |
@jtimberman @ritterwolf I have submitted a pull request that would allow the plugins array in .kitchen.yml work. When installing a busser-plugin, it will check if a version is specified by the array. |
fwiw - if using the rspec workaround, you might notice the output of serverspec gets buried by test-kitchen. To fix, add: serverspec > 2
serverspec < 2
|
👍 I'd love to lock down all gems and install new gems, using just one Gemfile as the input, or one list of gems with optional version specifiers. |
I'm working on a way to be able to specify not only busser plugin versions, but gem versions as well. Maybe I'll even be able to fit in setting test suite locations too! If everything is set in the .kitchen.yml file, then So far I'm thinking of something like this:
Obviously its still an idea, and there can be many other things like include or exclude files, assigning a test suite to a suite, etc.. |
This was fixed upstream test-kitchen/busser-serverspec@a41a6da |
Recently all the TestKitchen projects were failing because serverspec was updated. In order to escape this it's useful to be able to depend on particular version of busser, its plugins and libs like serverspec.
The text was updated successfully, but these errors were encountered: