Unverified Commit d953c687 authored by Martin Hickey's avatar Martin Hickey Committed by GitHub

Merge pull request #6039 from Constantin07/add_hpa_to_sorting_order

Added HPA to sort order.
parents 88bb48bc 535df90c
......@@ -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",
......
......@@ -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) {
......
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