29 lines
692 B
Go
29 lines
692 B
Go
package helmhelper
|
|
|
|
const (
|
|
MOCK_LATEST_VERSION = "v1.12.1"
|
|
MOCK_CHART_PATH = ".charts/repo-release-latest/release-latest.gz"
|
|
)
|
|
|
|
type Mock struct{}
|
|
|
|
func NewHelmMock() Helmhelper {
|
|
return &Mock{}
|
|
}
|
|
|
|
func (h *Mock) FindLatestVersion(workdir string, release *ChartData) (version string, err error) {
|
|
return MOCK_LATEST_VERSION, nil
|
|
}
|
|
|
|
func (h *Mock) PullChart(workdirPath string, release *ChartData) (path string, err error) {
|
|
return MOCK_CHART_PATH, nil
|
|
}
|
|
|
|
func (h *Mock) RenderChart(workdirPath string, release *ReleaseData) error {
|
|
return nil
|
|
}
|
|
|
|
func (h *Mock) PushChart(chartDir string, server, prefix, username, password string, chartdata *ChartData) (err error) {
|
|
return nil
|
|
}
|