tailored-automation / puppet-module-patroni

Puppet module to manage Patroni, a tool for making PostgreSQL highly available
Other
1 stars 18 forks source link

Fix unit tests and simplify using custom virtualenv #17

Closed treydock closed 3 years ago

treydock commented 3 years ago

Main change is one less parameter to use custom virtualenv. If you pass undef to virtualenv, that doesn't mean no value, it means you use python module default which is "system" so it's not undefined, it's just not defined in Patroni module so falls back to Python module default. If the goal is to provide a custom virtualenv path as opt-in, then only 1 parameter is needed rather than having to set 2 to get the same result.

The reason unit tests were failing is the contexts for new parameters were outside the context setting the OS facts, since it's completely valid to have nested contexts, just moved the new tests inside the OS fact context block.

Also removed management of this module adding virtualenv if a custom one is used since doesn't make sense to continue using this module's virtualenv if a custom one is supplied.

ghoneycutt commented 3 years ago

Closing in favor of #19