parent
a3e8c0426c
commit
04729b027a
|
|
@ -17,7 +17,9 @@ import (
|
||||||
"github.com/variantdev/chartify/helmtesting"
|
"github.com/variantdev/chartify/helmtesting"
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
|
|
||||||
|
"github.com/helmfile/helmfile/pkg/app"
|
||||||
"github.com/helmfile/helmfile/pkg/envvar"
|
"github.com/helmfile/helmfile/pkg/envvar"
|
||||||
|
"github.com/helmfile/helmfile/pkg/helmexec"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -47,10 +49,25 @@ type Config struct {
|
||||||
ChartifyTempDir string `yaml:"chartifyTempDir"`
|
ChartifyTempDir string `yaml:"chartifyTempDir"`
|
||||||
HelmfileArgs []string `yaml:"helmfileArgs"`
|
HelmfileArgs []string `yaml:"helmfileArgs"`
|
||||||
}
|
}
|
||||||
|
type fakeInit struct{}
|
||||||
|
|
||||||
|
func (f fakeInit) Force() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
func TestHelmfileTemplateWithBuildCommand(t *testing.T) {
|
func TestHelmfileTemplateWithBuildCommand(t *testing.T) {
|
||||||
localChartPortSets := make(map[int]struct{})
|
localChartPortSets := make(map[int]struct{})
|
||||||
|
|
||||||
|
logger := helmexec.NewLogger(os.Stderr, "info")
|
||||||
|
runner := &helmexec.ShellRunner{
|
||||||
|
Logger: logger,
|
||||||
|
}
|
||||||
|
|
||||||
|
c := fakeInit{}
|
||||||
|
helmfileInit := app.NewHelmfileInit("helm", c, logger, runner)
|
||||||
|
err := helmfileInit.CheckHelmPlugins()
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
_, filename, _, _ := runtime.Caller(0)
|
_, filename, _, _ := runtime.Caller(0)
|
||||||
projectRoot := filepath.Join(filepath.Dir(filename), "..", "..", "..", "..")
|
projectRoot := filepath.Join(filepath.Dir(filename), "..", "..", "..", "..")
|
||||||
helmfileBin := filepath.Join(projectRoot, "helmfile")
|
helmfileBin := filepath.Join(projectRoot, "helmfile")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue