2023-07-20 09:26:25 +00:00
|
|
|
package helmhelper
|
|
|
|
|
2023-10-13 16:02:11 +00:00
|
|
|
import (
|
|
|
|
"git.badhouseplants.net/allanger/shoebill/pkg/repository"
|
|
|
|
)
|
2023-07-20 09:26:25 +00:00
|
|
|
|
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{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Mock) FindLatestVersion(dir, chart string, repository repository.Repository) (version string, err error) {
|
|
|
|
return MOCK_LATEST_VERSION, nil
|
|
|
|
}
|
2023-10-13 16:02:11 +00:00
|
|
|
|
|
|
|
func (h *Mock) PullChart(workdirPath string, repository repository.Repository, chart, version string) (path string, err error) {
|
|
|
|
return MOCK_CHART_PATH, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Mock) RenderChart(workdirPath string, repository repository.Repository, ch2art, version string) error {
|
|
|
|
return nil
|
|
|
|
}
|