|
|
|
@ -26,119 +26,96 @@ import (
|
|
|
|
|
func TestKindSorter(t *testing.T) {
|
|
|
|
|
manifests := []manifest{
|
|
|
|
|
{
|
|
|
|
|
name: "i",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "ClusterRole"},
|
|
|
|
|
name: "i",
|
|
|
|
|
head: &util.SimpleHead{Kind: "ClusterRole"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "j",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "ClusterRoleBinding"},
|
|
|
|
|
name: "j",
|
|
|
|
|
head: &util.SimpleHead{Kind: "ClusterRoleBinding"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "e",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "ConfigMap"},
|
|
|
|
|
name: "e",
|
|
|
|
|
head: &util.SimpleHead{Kind: "ConfigMap"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "u",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "CronJob"},
|
|
|
|
|
name: "u",
|
|
|
|
|
head: &util.SimpleHead{Kind: "CronJob"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "n",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "DaemonSet"},
|
|
|
|
|
name: "n",
|
|
|
|
|
head: &util.SimpleHead{Kind: "DaemonSet"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "r",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Deployment"},
|
|
|
|
|
name: "r",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Deployment"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "!",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "HonkyTonkSet"},
|
|
|
|
|
name: "!",
|
|
|
|
|
head: &util.SimpleHead{Kind: "HonkyTonkSet"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "v",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Ingress"},
|
|
|
|
|
name: "v",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Ingress"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "t",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Job"},
|
|
|
|
|
name: "t",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Job"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "c",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "LimitRange"},
|
|
|
|
|
name: "c",
|
|
|
|
|
head: &util.SimpleHead{Kind: "LimitRange"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "a",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Namespace"},
|
|
|
|
|
name: "a",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Namespace"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "f",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "PersistentVolume"},
|
|
|
|
|
name: "f",
|
|
|
|
|
head: &util.SimpleHead{Kind: "PersistentVolume"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "g",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "PersistentVolumeClaim"},
|
|
|
|
|
name: "g",
|
|
|
|
|
head: &util.SimpleHead{Kind: "PersistentVolumeClaim"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "o",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Pod"},
|
|
|
|
|
name: "o",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Pod"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "q",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "ReplicaSet"},
|
|
|
|
|
name: "q",
|
|
|
|
|
head: &util.SimpleHead{Kind: "ReplicaSet"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "p",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "ReplicationController"},
|
|
|
|
|
name: "p",
|
|
|
|
|
head: &util.SimpleHead{Kind: "ReplicationController"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "b",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "ResourceQuota"},
|
|
|
|
|
name: "b",
|
|
|
|
|
head: &util.SimpleHead{Kind: "ResourceQuota"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "k",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Role"},
|
|
|
|
|
name: "k",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Role"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "l",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "RoleBinding"},
|
|
|
|
|
name: "l",
|
|
|
|
|
head: &util.SimpleHead{Kind: "RoleBinding"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "d",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Secret"},
|
|
|
|
|
name: "d",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Secret"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "m",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Service"},
|
|
|
|
|
name: "m",
|
|
|
|
|
head: &util.SimpleHead{Kind: "Service"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "h",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "ServiceAccount"},
|
|
|
|
|
name: "h",
|
|
|
|
|
head: &util.SimpleHead{Kind: "ServiceAccount"},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "s",
|
|
|
|
|
content: "",
|
|
|
|
|
head: &util.SimpleHead{Kind: "StatefulSet"},
|
|
|
|
|
name: "s",
|
|
|
|
|
head: &util.SimpleHead{Kind: "StatefulSet"},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|