Simplify and document plugin test harness.

This commit is contained in:
jregan
2019-11-29 06:50:02 -08:00
parent 8bb8637213
commit 038c070626
12 changed files with 60 additions and 50 deletions

View File

@@ -16,7 +16,7 @@ func TestValidatorHappy(t *testing.T) {
tc := kusttest_test.NewPluginTestEnv(t).Set()
defer tc.Reset()
tc.BuildExecPlugin("someteam.example.com", "v1", "Validator")
tc.PrepExecPlugin("someteam.example.com", "v1", "Validator")
th := kusttest_test.NewKustTestHarnessAllowPlugins(t, "/app")
rm := th.LoadAndRunTransformer(`
@@ -51,7 +51,7 @@ func TestValidatorUnHappy(t *testing.T) {
tc := kusttest_test.NewPluginTestEnv(t).Set()
defer tc.Reset()
tc.BuildExecPlugin("someteam.example.com", "v1", "Validator")
tc.PrepExecPlugin("someteam.example.com", "v1", "Validator")
th := kusttest_test.NewKustTestHarnessAllowPlugins(t, "/app")
err := th.ErrorFromLoadAndRunTransformer(`