Further isolate unstructured with factories.

This commit is contained in:
jregan
2018-10-06 10:44:34 -07:00
committed by Jeffrey Regan
parent 3cdfbd843b
commit 4eb2757847
31 changed files with 525 additions and 348 deletions

View File

@@ -128,7 +128,10 @@ func runBuildTestCase(t *testing.T, testcaseName string, updateKustomizeExpected
kustomizationPath: testcase.Filename,
}
buf := bytes.NewBuffer([]byte{})
err = ops.RunBuild(buf, fSys, k8sdeps.NewKustDecoder(), k8sdeps.NewKustHash())
err = ops.RunBuild(
buf, fSys,
k8sdeps.NewKustKunstructuredFactory(k8sdeps.NewKustDecoder()),
k8sdeps.NewKustDecoder(), k8sdeps.NewKustHash())
switch {
case err != nil && len(testcase.ExpectedError) == 0:
t.Errorf("unexpected error: %v", err)