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", "ReplicationController",
"ReplicaSet", "ReplicaSet",
"Deployment", "Deployment",
"HorizontalPodAutoscaler",
"StatefulSet", "StatefulSet",
"Job", "Job",
"CronJob", "CronJob",
@ -62,6 +63,7 @@ var UninstallOrder KindSortOrder = []string{
"CronJob", "CronJob",
"Job", "Job",
"StatefulSet", "StatefulSet",
"HorizontalPodAutoscaler",
"Deployment", "Deployment",
"ReplicaSet", "ReplicaSet",
"ReplicationController", "ReplicationController",

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

Loading…
Cancel
Save