Add the rmBuilder test helper.

This commit is contained in:
Jeffrey Regan
2019-06-13 15:32:17 -07:00
parent 16a9975e84
commit 8d9897d5a5
9 changed files with 258 additions and 270 deletions

View File

@@ -214,9 +214,9 @@ func TestResourceNotFound(t *testing.T) {
}
func findSecret(m resmap.ResMap) *resource.Resource {
for id, res := range m.AsMap() {
if id.Gvk().Kind == "Secret" {
return res
for _, r := range m.Resources() {
if r.Id().Gvk().Kind == "Secret" {
return r
}
}
return nil