puppetlabs / puppetlabs-node_manager

Create and manage PE node groups as resources.
Apache License 2.0
10 stars 21 forks source link

Fixing bug where false variables are treated as nil #69

Closed rcontisplk closed 1 year ago

rcontisplk commented 1 year ago

This fixes a bug where, in the case that a node_group friendly_name value is set to false, the value evaluates to nil, and the k/v pair is removed. This is undesirable behavior because it means values cannot be set to false, and, worse, Puppet Agent runs will have constant corrective changes trying to set a (now-non-existent) k/v pair to false on each run.

I've added spec tests to handle various possible values. If you add back in the ||nil in https.rb, you'll find that the tests fail, which shows the bug.