cmd/values: add test coverage
General MR
Summary
I wanted to increase test coverage for the cmd/values
function and noticed that a few of our packages could use improvements to make them testable.
This MR:
- Refactors
constants.go
to be more testable and allow downstream consumers to inject mock clients if desired - Adds in
mockery
(as well as a script and make target) to generatetestify/mock
compatible test fixtures - Refactors
cmd/values.go
to be allow more test injections - Adds additional testing hooks and methods to the
FakeFactory
and theFakeHelmClient
to allow method overriding to force errors - Increases test coverage of
values
from ~70% to 90%
Relevant logs/screenshots
Before
Linked Issue
After
Closes #57 (closed) Closes #62 (closed)
Upgrade Notices
N/A
Edited by Daniel Dides