add kind_sorter support for SecretList

Signed-off-by: Bin Liang <hzliangbin@foxmail.com>
pull/8176/head
hzliangbin 5 years ago committed by Bin Liang
parent 959c7cc8b1
commit 146e0f9cc3

@ -37,6 +37,7 @@ var InstallOrder KindSortOrder = []string{
"PodDisruptionBudget",
"ServiceAccount",
"Secret",
"SecretList",
"ConfigMap",
"StorageClass",
"PersistentVolume",
@ -93,6 +94,7 @@ var UninstallOrder KindSortOrder = []string{
"PersistentVolume",
"StorageClass",
"ConfigMap",
"SecretList",
"Secret",
"ServiceAccount",
"PodDisruptionBudget",

@ -25,6 +25,10 @@ import (
func TestKindSorter(t *testing.T) {
manifests := []Manifest{
{
Name: "E",
Head: &SimpleHead{Kind: "SecretList"},
},
{
Name: "i",
Head: &SimpleHead{Kind: "ClusterRole"},
@ -168,8 +172,8 @@ func TestKindSorter(t *testing.T) {
order KindSortOrder
expected string
}{
{"install", InstallOrder, "aAbcC3def1gh2iIjJkKlLmnopqrxstuvw!"},
{"uninstall", UninstallOrder, "wvmutsxrqponLlKkJjIi2hg1fed3CcbAa!"},
{"install", InstallOrder, "aAbcC3deEf1gh2iIjJkKlLmnopqrxstuvw!"},
{"uninstall", UninstallOrder, "wvmutsxrqponLlKkJjIi2hg1fEed3CcbAa!"},
} {
var buf bytes.Buffer
t.Run(test.description, func(t *testing.T) {

Loading…
Cancel
Save