diff --git a/pkg/action/hooks.go b/pkg/action/hooks.go index 35a12f411..8535acbcb 100644 --- a/pkg/action/hooks.go +++ b/pkg/action/hooks.go @@ -114,13 +114,6 @@ type hookByWeight []*release.Hook func (x hookByWeight) Len() int { return len(x) } func (x hookByWeight) Swap(i, j int) { x[i], x[j] = x[j], x[i] } func (x hookByWeight) Less(i, j int) bool { - if x[i].Weight == x[j].Weight { - return x[i].Name < x[j].Name - } - return x[i].Weight < x[j].Weight -} - -func (x hookByWeight) LessFixed(i, j int) bool { if x[i].Weight == x[j].Weight { ordering := make(map[string]int, len(releaseutil.InstallOrder)) for v, k := range releaseutil.InstallOrder { diff --git a/pkg/action/hooks_test.go b/pkg/action/hooks_test.go index 520d0851d..c197ba59d 100644 --- a/pkg/action/hooks_test.go +++ b/pkg/action/hooks_test.go @@ -43,7 +43,7 @@ func Test_hookByWeight(t *testing.T) { {Weight: 0, Kind: "Job", Name: "Job"}, {Weight: 1, Kind: "ServiceAccount", Name: "ServiceAccountA"}, {Weight: 1, Kind: "ServiceAccount", Name: "ServiceAccountB"}, - {Weight: 1, Kind: "Pod", Name: "podA"}, + {Weight: 1, Kind: "Pod", Name: "PodA"}, } for i, hook := range hooks {