Refactored Compontent tests to be table-driven

This commit is contained in:
Paul Martin
2020-05-28 21:05:13 +01:00
parent 34a442bbef
commit 93b0b1b0b1
2 changed files with 186 additions and 166 deletions

View File

@@ -52,6 +52,16 @@ kind: Kustomization
`+content))
}
func (th Harness) WriteC(path string, content string) {
th.fSys.WriteFile(
filepath.Join(
path,
konfig.DefaultKustomizationFileName()), []byte(`
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
`+content))
}
func (th Harness) WriteF(path string, content string) {
th.fSys.WriteFile(path, []byte(content))
}