Merge pull request #6047 from Constantin07/add_hpa_to_sorting_order_port_to_v3

Add hpa to sorting order (port to v3)
pull/5972/head
Martin Hickey 6 years ago committed by GitHub
commit 712c850ac5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -45,6 +45,7 @@ var InstallOrder KindSortOrder = []string{
"ReplicationController",
"ReplicaSet",
"Deployment",
"HorizontalPodAutoscaler",
"StatefulSet",
"Job",
"CronJob",
@ -62,6 +63,7 @@ var UninstallOrder KindSortOrder = []string{
"CronJob",
"Job",
"StatefulSet",
"HorizontalPodAutoscaler",
"Deployment",
"ReplicaSet",
"ReplicationController",

@ -127,6 +127,10 @@ func TestKindSorter(t *testing.T) {
Name: "w",
Head: &SimpleHead{Kind: "APIService"},
},
{
Name: "x",
Head: &SimpleHead{Kind: "HorizontalPodAutoscaler"},
},
}
for _, test := range []struct {
@ -134,8 +138,8 @@ func TestKindSorter(t *testing.T) {
order KindSortOrder
expected string
}{
{"install", InstallOrder, "abcde1fgh2ijklmnopqrstuvw!"},
{"uninstall", UninstallOrder, "wvmutsrqponlkji2hgf1edcba!"},
{"install", InstallOrder, "abcde1fgh2ijklmnopqrxstuvw!"},
{"uninstall", UninstallOrder, "wvmutsxrqponlkji2hgf1edcba!"},
} {
var buf bytes.Buffer
t.Run(test.description, func(t *testing.T) {

Loading…
Cancel
Save