Consolidate test harness to one package.

This commit is contained in:
Jeffrey Regan
2019-12-02 09:28:50 -08:00
parent ce935448c1
commit 382c330f5b
64 changed files with 676 additions and 710 deletions

View File

@@ -16,7 +16,7 @@ func TestBashedConfigMapPlugin(t *testing.T) {
tc.PrepExecPlugin(
"someteam.example.com", "v1", "BashedConfigMap")
th := kusttest_test.NewKustTestHarnessAllowPlugins(t, "/app")
th := kusttest_test.MakeHarnessEnhanced(t, "/app")
m := th.LoadAndRunGenerator(`
apiVersion: someteam.example.com/v1

View File

@@ -25,7 +25,7 @@ func TestChartInflator(t *testing.T) {
tc.PrepExecPlugin(
"someteam.example.com", "v1", "ChartInflator")
th := kusttest_test.NewKustTestHarnessAllowPlugins(t, "/app")
th := kusttest_test.MakeHarnessEnhanced(t, "/app")
m := th.LoadAndRunGenerator(`
apiVersion: someteam.example.com/v1

View File

@@ -15,7 +15,7 @@ func TestDatePrefixerPlugin(t *testing.T) {
tc.BuildGoPlugin(
"someteam.example.com", "v1", "DatePrefixer")
th := kusttest_test.NewKustTestHarnessAllowPlugins(t, "/app")
th := kusttest_test.MakeHarnessEnhanced(t, "/app")
m := th.LoadAndRunTransformer(`
apiVersion: someteam.example.com/v1

View File

@@ -22,7 +22,7 @@ func TestGoGetter(t *testing.T) {
tc.PrepExecPlugin(
"someteam.example.com", "v1", "GoGetter")
th := kusttest_test.NewKustTestHarnessAllowPlugins(t, "/app")
th := kusttest_test.MakeHarnessEnhanced(t, "/app")
m := th.LoadAndRunGenerator(`
apiVersion: someteam.example.com/v1
@@ -50,7 +50,7 @@ func TestGoGetterUrl(t *testing.T) {
tc.PrepExecPlugin(
"someteam.example.com", "v1", "GoGetter")
th := kusttest_test.NewKustTestHarnessAllowPlugins(t, "/app")
th := kusttest_test.MakeHarnessEnhanced(t, "/app")
m := th.LoadAndRunGenerator(`
apiVersion: someteam.example.com/v1
@@ -79,7 +79,7 @@ func TestGoGetterCommand(t *testing.T) {
tc.PrepExecPlugin(
"someteam.example.com", "v1", "GoGetter")
th := kusttest_test.NewKustTestHarnessAllowPlugins(t, "/app")
th := kusttest_test.MakeHarnessEnhanced(t, "/app")
m := th.LoadAndRunGenerator(`
apiVersion: someteam.example.com/v1
@@ -108,7 +108,7 @@ func TestGoGetterSubPath(t *testing.T) {
tc.PrepExecPlugin(
"someteam.example.com", "v1", "GoGetter")
th := kusttest_test.NewKustTestHarnessAllowPlugins(t, "/app")
th := kusttest_test.MakeHarnessEnhanced(t, "/app")
m := th.LoadAndRunGenerator(`
apiVersion: someteam.example.com/v1

View File

@@ -23,7 +23,7 @@ func TestPrintPluginEnvPlugin(t *testing.T) {
tc.PrepExecPlugin(
"someteam.example.com", "v1", "PrintPluginEnv")
th := kusttest_test.NewKustTestHarnessAllowPlugins(t, "/theAppRoot")
th := kusttest_test.MakeHarnessEnhanced(t, "/theAppRoot")
m := th.LoadAndRunGenerator(`
apiVersion: someteam.example.com/v1

View File

@@ -16,7 +16,7 @@ func TestSecretsFromDatabasePlugin(t *testing.T) {
tc.BuildGoPlugin(
"someteam.example.com", "v1", "SecretsFromDatabase")
th := kusttest_test.NewKustTestHarnessAllowPlugins(t, "/app")
th := kusttest_test.MakeHarnessEnhanced(t, "/app")
m := th.LoadAndRunGenerator(`
apiVersion: someteam.example.com/v1

View File

@@ -14,7 +14,7 @@ func TestSedTransformer(t *testing.T) {
defer tc.Reset()
tc.PrepExecPlugin("someteam.example.com", "v1", "SedTransformer")
th := kusttest_test.NewKustTestHarnessAllowPlugins(t, "/app")
th := kusttest_test.MakeHarnessEnhanced(t, "/app")
th.WriteF("/app/sed-input.txt", `
s/$FRUIT/orange/g

View File

@@ -16,7 +16,7 @@ func TestSomeServiceGeneratorPlugin(t *testing.T) {
tc.BuildGoPlugin(
"someteam.example.com", "v1", "SomeServiceGenerator")
th := kusttest_test.NewKustTestHarnessAllowPlugins(t, "/app")
th := kusttest_test.MakeHarnessEnhanced(t, "/app")
m := th.LoadAndRunGenerator(`
apiVersion: someteam.example.com/v1

View File

@@ -15,7 +15,7 @@ func TestStringPrefixerPlugin(t *testing.T) {
tc.BuildGoPlugin(
"someteam.example.com", "v1", "StringPrefixer")
th := kusttest_test.NewKustTestHarnessAllowPlugins(t, "/app")
th := kusttest_test.MakeHarnessEnhanced(t, "/app")
m := th.LoadAndRunTransformer(`
apiVersion: someteam.example.com/v1

View File

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