shoebill/internal/utils/helmhelper/mock.go

29 lines
692 B
Go
Raw Normal View History

2023-07-20 09:26:25 +00:00
package helmhelper
2023-10-13 16:02:11 +00:00
const (
MOCK_LATEST_VERSION = "v1.12.1"
MOCK_CHART_PATH = ".charts/repo-release-latest/release-latest.gz"
)
2023-07-20 09:26:25 +00:00
type Mock struct{}
func NewHelmMock() Helmhelper {
return &Mock{}
}
2023-12-20 16:36:14 +00:00
func (h *Mock) FindLatestVersion(workdir string, release *ChartData) (version string, err error) {
2023-07-20 09:26:25 +00:00
return MOCK_LATEST_VERSION, nil
}
2023-10-13 16:02:11 +00:00
2023-12-20 16:36:14 +00:00
func (h *Mock) PullChart(workdirPath string, release *ChartData) (path string, err error) {
2023-10-13 16:02:11 +00:00
return MOCK_CHART_PATH, nil
}
2023-10-20 11:31:30 +00:00
func (h *Mock) RenderChart(workdirPath string, release *ReleaseData) error {
2023-10-13 16:02:11 +00:00
return nil
}
2023-12-20 16:36:14 +00:00
func (h *Mock) PushChart(chartDir string, server, prefix, username, password string, chartdata *ChartData) (err error) {
return nil
}