|
|
|
@ -175,7 +175,7 @@ func TestKindSorterSubSort(t *testing.T) {
|
|
|
|
|
Head: &util.SimpleHead{Kind: "ClusterRoleBinding"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Name: "u3",
|
|
|
|
|
Name: "u2",
|
|
|
|
|
Head: &util.SimpleHead{Kind: "Unknown"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@ -183,8 +183,8 @@ func TestKindSorterSubSort(t *testing.T) {
|
|
|
|
|
Head: &util.SimpleHead{Kind: "Unknown"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Name: "u2",
|
|
|
|
|
Head: &util.SimpleHead{Kind: "Unknown"},
|
|
|
|
|
Name: "t3",
|
|
|
|
|
Head: &util.SimpleHead{Kind: "Unknown2"},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
for _, test := range []struct {
|
|
|
|
@ -193,7 +193,7 @@ func TestKindSorterSubSort(t *testing.T) {
|
|
|
|
|
expected string
|
|
|
|
|
}{
|
|
|
|
|
// expectation is sorted by kind (unknown is last) and then sub sorted alphabetically within each group
|
|
|
|
|
{"cm,clusterRole,clusterRoleBinding,Unknown", InstallOrder, "01Aa!zu1u2u3"},
|
|
|
|
|
{"cm,clusterRole,clusterRoleBinding,Unknown,Unknown2", InstallOrder, "01Aa!zu1u2t3"},
|
|
|
|
|
} {
|
|
|
|
|
var buf bytes.Buffer
|
|
|
|
|
t.Run(test.description, func(t *testing.T) {
|
|
|
|
|