mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 22:54:11 +02:00
added option for --no-hooks for helm diff and apply (#279)
* added option for --no-hooks for helm diff and apply Signed-off-by: Arpan Adhikari <kcarpan5@gmail.com> * test case for --no-hooks Signed-off-by: Arpan Adhikari <kcarpan5@gmail.com> * fix test fails Signed-off-by: Arpan Adhikari <kcarpan5@gmail.com> * Resolve conflict with main Signed-off-by: Arpan Adhikari <kcarpan5@gmail.com> * fixup! Resolve conflict with main Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com> * Add no-hooks case for diff test Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com> * fixup! Add no-hooks case for diff test Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com> Signed-off-by: Arpan Adhikari <kcarpan5@gmail.com> Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com> Co-authored-by: Arpan Adhikari <arpan@thephotostudio.com.au> Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
co-authored by
Arpan Adhikari
Yusuke Kuoka
parent
b8cf0f156e
commit
e1ca846772
@@ -22,6 +22,7 @@ func TestDiffWithNeeds(t *testing.T) {
|
||||
skipNeeds bool
|
||||
includeNeeds bool
|
||||
includeTransitiveNeeds bool
|
||||
noHooks bool
|
||||
}
|
||||
|
||||
type testcase struct {
|
||||
@@ -154,6 +155,7 @@ releases:
|
||||
skipNeeds: tc.fields.skipNeeds,
|
||||
includeNeeds: tc.fields.includeNeeds,
|
||||
includeTransitiveNeeds: tc.fields.includeTransitiveNeeds,
|
||||
noHooks: tc.fields.noHooks,
|
||||
})
|
||||
|
||||
var gotErr string
|
||||
@@ -297,6 +299,20 @@ releases:
|
||||
})
|
||||
})
|
||||
|
||||
t.Run("no-hooks", func(t *testing.T) {
|
||||
check(t, testcase{
|
||||
fields: fields{
|
||||
skipNeeds: true,
|
||||
noHooks: true,
|
||||
},
|
||||
selectors: []string{"app=test"},
|
||||
diffed: []exectest.Release{
|
||||
{Name: "external-secrets", Flags: []string{"--kube-context", "default", "--namespace", "default", "--no-hooks"}},
|
||||
{Name: "my-release", Flags: []string{"--kube-context", "default", "--namespace", "default", "--no-hooks"}},
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
t.Run("bad selector", func(t *testing.T) {
|
||||
check(t, testcase{
|
||||
selectors: []string{"app=test_non_existent"},
|
||||
|
||||
Reference in New Issue
Block a user