users
users copied to clipboard
redesign test for key retrieval via http
Description
Revises test cookbook so that instead of downloading an individual's personal keys from GitHub, it
starts a web service and uses it to serve dedicated keys for validating that the user_manage
resource can retrieve ssh keys via http.
Issues Resolved
Resolves #427
Check List
- [x] All tests pass. Except group tests on opensuse, which are failing for unrelated reasons. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD
- [x] New functionality includes testing.
- [x] New functionality has been documented in the README if applicable
- [x] All commits have been signed for the Developer Certificate of Origin. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD
It looks like the travis-ci build is having problems installing ChefDK while setting up the test environment. This error makes it look like it might have a corrupt apt-get
cache, or be hitting a broken mirror: https://travis-ci.org/chef-cookbooks/users/jobs/540010073#L574 .
Sorry, I thought I wrapped this up long ago, but apparently I didn't update the PR. I added a prefix to non-ssl http, so it's now INSECURE:http://...
. kitchen verify
passed, and there was nothing unexpected with the rebase.
However, it appears that recent changes set enforce_idempotency
in kitchen. Because there is no way to ignore specific resources with enforce_idempotency
, and the users_manage
resource does not support :before
notifications, I don't see a portable way to make this patch start the web service for the users_manage
resource without tripping up the idempotency checks.
Hmm I will try to dig into that issue if I can find some time this weekend. I imagine there has to be a way to give a list of resources that are expected to lack idempotency
because of their nature either through configuration initialization or inline. I have not been deeply involved in the chef world for a while so maybe I am remembering things incorrectly.
@majormoses that would be a sweet feature to have in test-kitchen
BTW we're in the process of adopting this cookbook into Sous Chefs so please give us a week or so to get this repo ready for our automation.
closing this due to age. please feel free to reopen if needed.