Commit 535df90c authored by Constantin Bugneac's avatar Constantin Bugneac

Added HorizontalPodAutoscaler to sort order.

Signed-off-by: 's avatarConstantin Bugneac <constantin.bugneac@worldfirst.com>
parent a4b1d012
...@@ -53,6 +53,7 @@ var InstallOrder SortOrder = []string{ ...@@ -53,6 +53,7 @@ var InstallOrder SortOrder = []string{
"ReplicationController", "ReplicationController",
"ReplicaSet", "ReplicaSet",
"Deployment", "Deployment",
"HorizontalPodAutoscaler",
"StatefulSet", "StatefulSet",
"Job", "Job",
"CronJob", "CronJob",
...@@ -70,6 +71,7 @@ var UninstallOrder SortOrder = []string{ ...@@ -70,6 +71,7 @@ var UninstallOrder SortOrder = []string{
"CronJob", "CronJob",
"Job", "Job",
"StatefulSet", "StatefulSet",
"HorizontalPodAutoscaler",
"Deployment", "Deployment",
"ReplicaSet", "ReplicaSet",
"ReplicationController", "ReplicationController",
......
...@@ -153,6 +153,10 @@ func TestKindSorter(t *testing.T) { ...@@ -153,6 +153,10 @@ func TestKindSorter(t *testing.T) {
Name: "z", Name: "z",
Head: &util.SimpleHead{Kind: "PodDisruptionBudget"}, Head: &util.SimpleHead{Kind: "PodDisruptionBudget"},
}, },
{
Name: "x",
Head: &util.SimpleHead{Kind: "HorizontalPodAutoscaler"},
},
} }
for _, test := range []struct { for _, test := range []struct {
...@@ -160,8 +164,8 @@ func TestKindSorter(t *testing.T) { ...@@ -160,8 +164,8 @@ func TestKindSorter(t *testing.T) {
order SortOrder order SortOrder
expected string expected string
}{ }{
{"install", InstallOrder, "abc3zde1fgh2iIjJkKlLmnopqrstuvw!"}, {"install", InstallOrder, "abc3zde1fgh2iIjJkKlLmnopqrxstuvw!"},
{"uninstall", UninstallOrder, "wvmutsrqponLlKkJjIi2hgf1edz3cba!"}, {"uninstall", UninstallOrder, "wvmutsxrqponLlKkJjIi2hgf1edz3cba!"},
} { } {
var buf bytes.Buffer var buf bytes.Buffer
t.Run(test.description, func(t *testing.T) { t.Run(test.description, func(t *testing.T) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment