skip filtering resmap when the resource is a cluster level resource

This commit is contained in:
Jingfang Liu
2018-10-17 13:35:20 -07:00
parent 66bbae586f
commit 90c88d7f96
7 changed files with 139 additions and 25 deletions

View File

@@ -160,6 +160,11 @@ func TestFilterBy(t *testing.T) {
if !reflect.DeepEqual(rm, ns1map) {
t.Fatalf("Expected %v but got back %v", rm, ns1map)
}
clmap := rm1.FilterBy(resid.NewResId(gvk.Gvk{Kind: "ClusterRoleBinding"}, "crb"))
if !reflect.DeepEqual(rm1, clmap) {
t.Fatalf("Expected %v but got back %v", rm1, clmap)
}
}
func TestDeepCopy(t *testing.T) {
rm1 := ResMap{