-
Notifications
You must be signed in to change notification settings - Fork 42
Conversation
Yes... I think we should move to serverspec. Can you remove the minitest in your PR? |
haha no worries! I would encourage you to merge the other now, and I'll work off it and likely submit for tomorrow. It'll be a bit of change, and the other PR is pretty simple, so I'd love to see that get in first :) |
Heh. Took less effort than expected. I'll get the postgresql tests going in another PR :) To be fair, I'm still running test-kitchen on the platforms, so probably good to wait on that first :) |
cookbook 'java', | ||
# Pending release: ark_java fails when tar is not installed | ||
# See: https://github.com/agileorbit-cookbooks/java/issues/263 | ||
github: 'agileorbit-cookbooks/java' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've got some pointers in the Berksfile to unpinned git repos, so I'm wondering whether we should commit the Berksfile lock to eliminate noise from the odd broken commit... Thoughts?
Or we could pin to a specific commit in these repos. Your call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only concern of pinning the other cookbook will raise conflict.
e.g. java
Other cookbook may depend to an older version if we pin to the github HEAD.
And if we pinned to a specific version, Berkshelf may not handle the dependency resolution well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand it, cookbooks that depend on this one never ever look at the Berksfile and its lockfile when doing dependency resolution -- just the metadata.rb. These are just used for us :)
The downside of locking is that our travis tests (once we get them going) might not immediately reveal a failure that I user might be seeing when an upstream cookbook breaks something -- we'd have to explicitly update the lockfile and commit it to see that failure. Either one of these approached could work for us
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, seems some cookbooks even add them the chefignore:
https://github.com/ramonskie/bamboo/blob/master/chefignore#L72
Platforms that I've confirmed working:
The boxes are taking awhile to download for the remaining platforms, so I'll have to leave that for later. Feel free to test those yourself if you have time, but otherwise I'll confirm tomorrow |
Good to go! |
👍 Merged |
@patcon Could you please explain why have you added |
Good point. I think I started using this pattern before chef_zero provisioner was default, and just never re-thought it :) I suspect it's not needed, but I opened an issue in their queue for feedback (auto-ref'd above) |
hm. As was brought up in the linked issue, the node object isn't a deepmerged hash, so it would seem that in order to use that, chef would need to be installed in the busser-serverspec gemspec So it seems the cookbook is still useful. But I could be wrong |
Or wait, we'd need a custom gemfile with chef: All-in-all, I'd almost rather use the test-helper cookbook, but open to other options if someone wants to investigate |
@patcon Ah, now I got how it works. You dump the node object to the JSON file on the host machine in order to use this JSON in integration tests on "verify" step.
Well, you can disregard my question. And thank you for explanation. 👍 P.s. But personally I don't like this approach. IMO, it's more reliable to use pre-defined values in tests rather than ones generated dynamically (example in confluence cookbook). |
fwiw, it's not always the right way, but when the logic is a little odd (particularly legacy anti-patterns like calculated attributes or state storing in attributes), sometimes you want it. We had a situation when setting a software version wasn't resulting in that version being installed, so it was very helpful to cross-check the |
The current minitest chef_handler stuff seems to be out-of-vogue. Normally, this wouldn't really matter, but given that it required chef_gem resources and compile time activity (which is now considered something to be wary of and uses minimally), I think we'd do well to move to busser-serverspec.
I've got most of the work done on a branch, but haven't create a PR yet. If I submit a minimally intrusive PR (with no new tests to begin with), would that be acceptable?