PR #555 (fixing #291) added ifNonempty:path,prefix,suffix support to both cli/planner.py::resolve_expr and cli/renderer.py::_resolve_expr. Test coverage (tests/test_planner.py's test_substitute_string_if_nonempty_omits_affix_for_empty_password / test_substitute_string_if_nonempty_includes_password_in_redis_uri) only exercises the planner.py copy.
renderer.py's _resolve_expr is a separate implementation with no direct test coverage for this new branch.
Task
Add equivalent test cases to tests/test_renderer.py covering ifNonempty: resolution in _resolve_expr/_substitute_string (empty value omits prefix/suffix; non-empty value includes them; ideally also the malformed-expression case once #557 is fixed).
Follow-up from PR #555 review.
PR #555 (fixing #291) added
ifNonempty:path,prefix,suffixsupport to bothcli/planner.py::resolve_exprandcli/renderer.py::_resolve_expr. Test coverage (tests/test_planner.py'stest_substitute_string_if_nonempty_omits_affix_for_empty_password/test_substitute_string_if_nonempty_includes_password_in_redis_uri) only exercises theplanner.pycopy.renderer.py's_resolve_expris a separate implementation with no direct test coverage for this new branch.Task
Add equivalent test cases to
tests/test_renderer.pycoveringifNonempty:resolution in_resolve_expr/_substitute_string(empty value omits prefix/suffix; non-empty value includes them; ideally also the malformed-expression case once #557 is fixed).Follow-up from PR #555 review.