mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-09 15:26:41 +02:00
feat: Opt-out dep-builds and repo-updates (#463)
* Improve code organization To make sure it is still readable after upcoming changes to helmfile * feat: `helmfile deps` to update dependencies of all the local charts Resolves #450 * feat: helmfile updates repos and build deps by default But not update deps. Use `helmfile deps` to update deps, and provide `--skip-deps` to skip updating repos and builds deps in sync/diff/apply/template Resolves #415 * Improve integration test coverage
This commit is contained in:
@@ -159,6 +159,29 @@ exec: helm dependency update ./chart/foo --verify --kube-context dev
|
||||
}
|
||||
}
|
||||
|
||||
func Test_BuildDeps(t *testing.T) {
|
||||
var buffer bytes.Buffer
|
||||
logger := NewLogger(&buffer, "debug")
|
||||
helm := MockExecer(logger, "dev")
|
||||
helm.BuildDeps("./chart/foo")
|
||||
expected := `Building dependency ./chart/foo
|
||||
exec: helm dependency build ./chart/foo --kube-context dev
|
||||
`
|
||||
if buffer.String() != expected {
|
||||
t.Errorf("helmexec.BuildDeps()\nactual = %v\nexpect = %v", buffer.String(), expected)
|
||||
}
|
||||
|
||||
buffer.Reset()
|
||||
helm.SetExtraArgs("--verify")
|
||||
helm.BuildDeps("./chart/foo")
|
||||
expected = `Building dependency ./chart/foo
|
||||
exec: helm dependency build ./chart/foo --verify --kube-context dev
|
||||
`
|
||||
if buffer.String() != expected {
|
||||
t.Errorf("helmexec.BuildDeps()\nactual = %v\nexpect = %v", buffer.String(), expected)
|
||||
}
|
||||
}
|
||||
|
||||
func Test_DecryptSecret(t *testing.T) {
|
||||
var buffer bytes.Buffer
|
||||
logger := NewLogger(&buffer, "debug")
|
||||
|
||||
Reference in New Issue
Block a user