fix: using correct option for takeOwnership flag (#1892)

Fixed test to correctly assert the new flag

Signed-off-by: Adam Blasko <adam.blasko1@gmail.com>
This commit is contained in:
Adam Blasko
2025-01-23 08:30:39 +08:00
committed by GitHub
parent 2b9ed46b32
commit 524636c0a8
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -155,7 +155,7 @@ func (st *HelmState) appendTakeOwnershipFlags(flags []string, helm helmexec.Inte
return flags
}
switch {
case ops.HideNotes:
case ops.TakeOwnership:
flags = append(flags, "--take-ownership")
}
return flags
+3 -3
View File
@@ -340,18 +340,18 @@ func TestAppendTakeOwnershipFlags(t *testing.T) {
flags: []string{},
helm: testutil.NewVersionHelmExec("3.16.0"),
opt: &SyncOpts{
HideNotes: true,
TakeOwnership: true,
},
expected: []string{},
},
},
{
name: "hide-notes from cmd flag",
name: "take-ownership from cmd flag",
args: args{
flags: []string{},
helm: testutil.NewVersionHelmExec("3.17.0"),
opt: &SyncOpts{
HideNotes: true,
TakeOwnership: true,
},
expected: []string{"--take-ownership"},
},