improve tests for alternative kustomization file names

This commit is contained in:
Jeffrey Regan
2019-10-04 10:17:49 -07:00
parent 404d2d631a
commit 07e0e46ac7
15 changed files with 61 additions and 43 deletions

View File

@@ -81,7 +81,7 @@ func commaOr(q []string) string {
func loadKustFile(ldr ifc.Loader) ([]byte, error) {
var content []byte
match := 0
for _, kf := range pgmconfig.KustomizationFileNames() {
for _, kf := range pgmconfig.RecognizedKustomizationFileNames() {
c, err := ldr.Load(kf)
if err == nil {
match += 1
@@ -92,7 +92,7 @@ func loadKustFile(ldr ifc.Loader) ([]byte, error) {
case 0:
return nil, fmt.Errorf(
"unable to find one of %v in directory '%s'",
commaOr(quoted(pgmconfig.KustomizationFileNames())),
commaOr(quoted(pgmconfig.RecognizedKustomizationFileNames())),
ldr.Root())
case 1:
return content, nil