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

View File

@@ -1,18 +1,5 @@
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package target_test