Commit e028be06 authored by Steven E. Harris's avatar Steven E. Harris Committed by GitHub

Merge pull request #2650 from arschles/apiservice

Add the "APIService" kind to the installation sort order
parents 72bb046c 58a2d7b5
......@@ -49,12 +49,14 @@ var InstallOrder SortOrder = []string{
"Job",
"CronJob",
"Ingress",
"APIService",
}
// 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.
var UninstallOrder SortOrder = []string{
"APIService",
"Ingress",
"Service",
"CronJob",
......
......@@ -140,6 +140,11 @@ func TestKindSorter(t *testing.T) {
content: "",
head: &util.SimpleHead{Kind: "StatefulSet"},
},
{
name: "w",
content: "",
head: &util.SimpleHead{Kind: "APIService"},
},
}
for _, test := range []struct {
......@@ -147,8 +152,8 @@ func TestKindSorter(t *testing.T) {
order SortOrder
expected string
}{
{"install", InstallOrder, "abcdefghijklmnopqrstuv!"},
{"uninstall", UninstallOrder, "vmutsrqponlkjihgfedcba!"},
{"install", InstallOrder, "abcdefghijklmnopqrstuvw!"},
{"uninstall", UninstallOrder, "wvmutsrqponlkjihgfedcba!"},
} {
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