Merge lp:~michael.nelson/charm-helpers/ensure_etc_salt_exists into lp:charm-helpers
Status: | Merged |
---|---|
Merged at revision: | 58 |
Proposed branch: | lp:~michael.nelson/charm-helpers/ensure_etc_salt_exists |
Merge into: | lp:charm-helpers |
Diff against target: |
95 lines (+24/-4) 5 files modified
Makefile (+4/-0) charmhelpers/contrib/saltstack/__init__.py (+5/-0) tests/contrib/jujugui/test_utils.py (+2/-0) tests/contrib/saltstack/test_saltstates.py (+5/-4) tests/core/test_hookenv.py (+8/-0) |
To merge this branch: | bzr merge lp:~michael.nelson/charm-helpers/ensure_etc_salt_exists |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matthew Wedgwood (community) | Approve | ||
Review via email: mp+170546@code.launchpad.net |
Description of the change
When installing only the salt-common lib, the /etc/salt directory is not created (at least with the version I'm using from lamont).
This branch was just going to ensure that the dir exists before it writes out the grains for use in templates...
...but, while QAing this branch on my charm, I came across some changed behaviour in hookenv.
What I was seeing was this http://
So I added a test to demo the issue and fixed it. Just in terms of consistency, I'm not sure whether it's intended that hookenv.unit_get always returns a dict (result of json.loads) rather than a Serializable (when the result isn't None, that is).
Finally, I got sick of waiting for one specific test to finish when doing `make test`, so added `make ftest` for use while developing.
Hi, Michael,
Looks like stub's submitted an MP that removes the automatic decoration of those values with Serializable. I think that's a sensible solution and I think it should simplify things for you. That MP needs a bit of work before it can be merged.
If stub doesn't have the time to fix up the tests, I can probably get to that early next week.