Skip to content
Snippets Groups Projects
Commit c47547622f60 authored by Richard Clamp's avatar Richard Clamp
Browse files

Only set the password when it is supplied

Here we make use of the `property_is_set?` function to gate the
management of the password when the property has been supplied, and then
treat `nil` to mean explicitly reset the password.

In order to add confidence that it is working we add a new test
cookbook, and add a spec/chef/resources/postgres_user_spec.rb to make
use of it.

We also add an explcit execute resource, to fixup user options if needed

Sadly these tests reveal that the handling of nil values for properties
fails when using chef 12.  When extracted[1] we can see this works
with chef 13, but as an upgrade is out of scope for now, we mark the
example as pending.

[1] https://gitlab.com/richardc/lwrp-nil-headache/
parent fed48ae53102
No related branches found
No related tags found
No related merge requests found
Showing
with 189 additions and 4 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment