Merge pull request #2650 from arschles/apiservice

Add the "APIService" kind to the installation sort order
reviewable/pr2667/r1
Steven E. Harris 8 years ago committed by GitHub
commit e028be065d

@ -49,12 +49,14 @@ var InstallOrder SortOrder = []string{
"Job", "Job",
"CronJob", "CronJob",
"Ingress", "Ingress",
"APIService",
} }
// UninstallOrder is the order in which manifests should be uninstalled (by Kind). // UninstallOrder is the order in which manifests should be uninstalled (by Kind).
// //
// Those occurring earlier in the list get uninstalled before those occurring later in the list. // Those occurring earlier in the list get uninstalled before those occurring later in the list.
var UninstallOrder SortOrder = []string{ var UninstallOrder SortOrder = []string{
"APIService",
"Ingress", "Ingress",
"Service", "Service",
"CronJob", "CronJob",

@ -140,6 +140,11 @@ func TestKindSorter(t *testing.T) {
content: "", content: "",
head: &util.SimpleHead{Kind: "StatefulSet"}, head: &util.SimpleHead{Kind: "StatefulSet"},
}, },
{
name: "w",
content: "",
head: &util.SimpleHead{Kind: "APIService"},
},
} }
for _, test := range []struct { for _, test := range []struct {
@ -147,8 +152,8 @@ func TestKindSorter(t *testing.T) {
order SortOrder order SortOrder
expected string expected string
}{ }{
{"install", InstallOrder, "abcdefghijklmnopqrstuv!"}, {"install", InstallOrder, "abcdefghijklmnopqrstuvw!"},
{"uninstall", UninstallOrder, "vmutsrqponlkjihgfedcba!"}, {"uninstall", UninstallOrder, "wvmutsrqponlkjihgfedcba!"},
} { } {
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