mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-09 18:15:40 +02:00
fix: Check needs with context and namespace (#1986)
* fix: Check needs with context and namespace Signed-off-by: André Arnqvist <andrearnqvist@gmail.com> * fix: Ensure releases have overrides Signed-off-by: André Arnqvist <andrearnqvist@gmail.com> * fix: Run go fmt Signed-off-by: André Arnqvist <andrearnqvist@gmail.com> * fix: Add tests checking needs with same name in different namespaces Signed-off-by: André Arnqvist <andrearnqvist@gmail.com> * fix: Simplify setting overrides Signed-off-by: André Arnqvist <andrearnqvist@gmail.com> --------- Signed-off-by: André Arnqvist <andrearnqvist@gmail.com>
This commit is contained in:
@@ -533,6 +533,34 @@ releases:
|
||||
},
|
||||
upgraded: []exectest.Release{},
|
||||
},
|
||||
{
|
||||
name: "upgrade when ns1/foo needs ns1/bar and ns2/bar is disabled",
|
||||
loc: location(),
|
||||
files: map[string]string{
|
||||
"/path/to/helmfile.yaml": `
|
||||
releases:
|
||||
- name: bar
|
||||
chart: mychart2
|
||||
namespace: ns1
|
||||
- name: bar
|
||||
chart: mychart2
|
||||
namespace: ns2
|
||||
installed: false
|
||||
- name: foo
|
||||
chart: mychart1
|
||||
namespace: ns1
|
||||
needs:
|
||||
- ns1/bar
|
||||
`,
|
||||
},
|
||||
detailedExitcode: true,
|
||||
error: "Identified at least one change",
|
||||
diffs: map[exectest.DiffKey]error{
|
||||
{Name: "bar", Chart: "mychart2", Flags: "--kube-context default --namespace ns1 --detailed-exitcode --reset-values"}: helmexec.ExitError{Code: 2},
|
||||
{Name: "foo", Chart: "mychart1", Flags: "--kube-context default --namespace ns1 --detailed-exitcode --reset-values"}: helmexec.ExitError{Code: 2},
|
||||
},
|
||||
upgraded: []exectest.Release{},
|
||||
},
|
||||
{
|
||||
name: "upgrade when tns1 ns1 foo needs tns2 ns2 bar",
|
||||
loc: location(),
|
||||
|
||||
Reference in New Issue
Block a user