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.
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.