|
|
@ -79,6 +79,10 @@ func TestKindSorter(t *testing.T) {
|
|
|
|
Name: "a",
|
|
|
|
Name: "a",
|
|
|
|
Head: &SimpleHead{Kind: "Namespace"},
|
|
|
|
Head: &SimpleHead{Kind: "Namespace"},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Name: "A",
|
|
|
|
|
|
|
|
Head: &SimpleHead{Kind: "NetworkPolicy"},
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Name: "f",
|
|
|
|
Name: "f",
|
|
|
|
Head: &SimpleHead{Kind: "PersistentVolume"},
|
|
|
|
Head: &SimpleHead{Kind: "PersistentVolume"},
|
|
|
@ -91,6 +95,14 @@ func TestKindSorter(t *testing.T) {
|
|
|
|
Name: "o",
|
|
|
|
Name: "o",
|
|
|
|
Head: &SimpleHead{Kind: "Pod"},
|
|
|
|
Head: &SimpleHead{Kind: "Pod"},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Name: "3",
|
|
|
|
|
|
|
|
Head: &SimpleHead{Kind: "PodDisruptionBudget"},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Name: "C",
|
|
|
|
|
|
|
|
Head: &SimpleHead{Kind: "PodSecurityPolicy"},
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Name: "q",
|
|
|
|
Name: "q",
|
|
|
|
Head: &SimpleHead{Kind: "ReplicaSet"},
|
|
|
|
Head: &SimpleHead{Kind: "ReplicaSet"},
|
|
|
@ -154,8 +166,8 @@ func TestKindSorter(t *testing.T) {
|
|
|
|
order KindSortOrder
|
|
|
|
order KindSortOrder
|
|
|
|
expected string
|
|
|
|
expected string
|
|
|
|
}{
|
|
|
|
}{
|
|
|
|
{"install", InstallOrder, "abcde1fgh2iIjJkKlLmnopqrxstuvw!"},
|
|
|
|
{"install", InstallOrder, "aAbcC3de1fgh2iIjJkKlLmnopqrxstuvw!"},
|
|
|
|
{"uninstall", UninstallOrder, "wvmutsxrqponLlKkJjIi2hgf1edcba!"},
|
|
|
|
{"uninstall", UninstallOrder, "wvmutsxrqponLlKkJjIi2hgf1ed3CcbAa!"},
|
|
|
|
} {
|
|
|
|
} {
|
|
|
|
var buf bytes.Buffer
|
|
|
|
var buf bytes.Buffer
|
|
|
|
t.Run(test.description, func(t *testing.T) {
|
|
|
|
t.Run(test.description, func(t *testing.T) {
|
|
|
|