From 535df90cc8d13978c016aaecf575dbd3f3f3541e Mon Sep 17 00:00:00 2001 From: Constantin Bugneac Date: Thu, 18 Jul 2019 15:24:32 +0100 Subject: [PATCH] Added HorizontalPodAutoscaler to sort order. Signed-off-by: Constantin Bugneac --- pkg/tiller/kind_sorter.go | 2 ++ pkg/tiller/kind_sorter_test.go | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/tiller/kind_sorter.go b/pkg/tiller/kind_sorter.go index 2c11aa855..5c7193dee 100644 --- a/pkg/tiller/kind_sorter.go +++ b/pkg/tiller/kind_sorter.go @@ -53,6 +53,7 @@ var InstallOrder SortOrder = []string{ "ReplicationController", "ReplicaSet", "Deployment", + "HorizontalPodAutoscaler", "StatefulSet", "Job", "CronJob", @@ -70,6 +71,7 @@ var UninstallOrder SortOrder = []string{ "CronJob", "Job", "StatefulSet", + "HorizontalPodAutoscaler", "Deployment", "ReplicaSet", "ReplicationController", diff --git a/pkg/tiller/kind_sorter_test.go b/pkg/tiller/kind_sorter_test.go index 626e80ee6..3b37256ed 100644 --- a/pkg/tiller/kind_sorter_test.go +++ b/pkg/tiller/kind_sorter_test.go @@ -153,6 +153,10 @@ func TestKindSorter(t *testing.T) { Name: "z", Head: &util.SimpleHead{Kind: "PodDisruptionBudget"}, }, + { + Name: "x", + Head: &util.SimpleHead{Kind: "HorizontalPodAutoscaler"}, + }, } for _, test := range []struct { @@ -160,8 +164,8 @@ func TestKindSorter(t *testing.T) { order SortOrder expected string }{ - {"install", InstallOrder, "abc3zde1fgh2iIjJkKlLmnopqrstuvw!"}, - {"uninstall", UninstallOrder, "wvmutsrqponLlKkJjIi2hgf1edz3cba!"}, + {"install", InstallOrder, "abc3zde1fgh2iIjJkKlLmnopqrxstuvw!"}, + {"uninstall", UninstallOrder, "wvmutsxrqponLlKkJjIi2hgf1edz3cba!"}, } { var buf bytes.Buffer t.Run(test.description, func(t *testing.T) {