|
|
@ -41,6 +41,10 @@ func TestKindSorter(t *testing.T) {
|
|
|
|
Name: "u",
|
|
|
|
Name: "u",
|
|
|
|
Head: &util.SimpleHead{Kind: "CronJob"},
|
|
|
|
Head: &util.SimpleHead{Kind: "CronJob"},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Name: "2",
|
|
|
|
|
|
|
|
Head: &util.SimpleHead{Kind: "CustomResourceDefinition"},
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Name: "n",
|
|
|
|
Name: "n",
|
|
|
|
Head: &util.SimpleHead{Kind: "DaemonSet"},
|
|
|
|
Head: &util.SimpleHead{Kind: "DaemonSet"},
|
|
|
@ -49,10 +53,6 @@ func TestKindSorter(t *testing.T) {
|
|
|
|
Name: "r",
|
|
|
|
Name: "r",
|
|
|
|
Head: &util.SimpleHead{Kind: "Deployment"},
|
|
|
|
Head: &util.SimpleHead{Kind: "Deployment"},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
|
|
|
|
Name: "1",
|
|
|
|
|
|
|
|
Head: &util.SimpleHead{Kind: "StorageClass"},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Name: "!",
|
|
|
|
Name: "!",
|
|
|
|
Head: &util.SimpleHead{Kind: "HonkyTonkSet"},
|
|
|
|
Head: &util.SimpleHead{Kind: "HonkyTonkSet"},
|
|
|
@ -121,6 +121,10 @@ func TestKindSorter(t *testing.T) {
|
|
|
|
Name: "s",
|
|
|
|
Name: "s",
|
|
|
|
Head: &util.SimpleHead{Kind: "StatefulSet"},
|
|
|
|
Head: &util.SimpleHead{Kind: "StatefulSet"},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Name: "1",
|
|
|
|
|
|
|
|
Head: &util.SimpleHead{Kind: "StorageClass"},
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Name: "w",
|
|
|
|
Name: "w",
|
|
|
|
Head: &util.SimpleHead{Kind: "APIService"},
|
|
|
|
Head: &util.SimpleHead{Kind: "APIService"},
|
|
|
@ -132,8 +136,8 @@ func TestKindSorter(t *testing.T) {
|
|
|
|
order SortOrder
|
|
|
|
order SortOrder
|
|
|
|
expected string
|
|
|
|
expected string
|
|
|
|
}{
|
|
|
|
}{
|
|
|
|
{"install", InstallOrder, "abcde1fghijklmnopqrstuvw!"},
|
|
|
|
{"install", InstallOrder, "abcde1fgh2ijklmnopqrstuvw!"},
|
|
|
|
{"uninstall", UninstallOrder, "wvmutsrqponlkjihgf1edcba!"},
|
|
|
|
{"uninstall", UninstallOrder, "wvmutsrqponlkji2hgf1edcba!"},
|
|
|
|
} {
|
|
|
|
} {
|
|
|
|
var buf bytes.Buffer
|
|
|
|
var buf bytes.Buffer
|
|
|
|
t.Run(test.description, func(t *testing.T) {
|
|
|
|
t.Run(test.description, func(t *testing.T) {
|
|
|
|