hide patch transformer behind interface

This commit is contained in:
Jingfang Liu
2018-10-08 15:14:52 -07:00
parent 0f4ab07324
commit 78de5374ed
11 changed files with 81 additions and 18 deletions

View File

@@ -27,6 +27,7 @@ import (
"github.com/ghodss/yaml"
"sigs.k8s.io/kustomize/internal/k8sdeps"
"sigs.k8s.io/kustomize/internal/k8sdeps/patch"
"sigs.k8s.io/kustomize/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/constants"
"sigs.k8s.io/kustomize/pkg/fs"
@@ -131,6 +132,7 @@ func runBuildTestCase(t *testing.T, testcaseName string, updateKustomizeExpected
err = ops.RunBuild(
buf, fSys,
k8sdeps.NewKustKunstructuredFactory(k8sdeps.NewKustDecoder()),
patch.NewPatchTransformerFactory(),
k8sdeps.NewKustDecoder(), k8sdeps.NewKustHash())
switch {
case err != nil && len(testcase.ExpectedError) == 0: