Update references to NewEnvForTest

This commit is contained in:
Richard Marshall
2019-07-10 17:23:51 -07:00
parent 0d8d9e2f2b
commit 095333ffb1
26 changed files with 70 additions and 68 deletions

View File

@@ -8,7 +8,7 @@ import (
"testing"
"sigs.k8s.io/kustomize/v3/pkg/kusttest"
"sigs.k8s.io/kustomize/v3/pkg/plugins"
plugins_test "sigs.k8s.io/kustomize/v3/pkg/plugins/test"
)
const target = `
@@ -29,7 +29,7 @@ spec:
`
func TestPatchJson6902TransformerMissingFile(t *testing.T) {
tc := plugins.NewEnvForTest(t).Set()
tc := plugins_test.NewEnvForTest(t).Set()
defer tc.Reset()
tc.BuildGoPlugin(
@@ -58,7 +58,7 @@ path: jsonpatch.json
}
func TestBadPatchJson6902Transformer(t *testing.T) {
tc := plugins.NewEnvForTest(t).Set()
tc := plugins_test.NewEnvForTest(t).Set()
defer tc.Reset()
tc.BuildGoPlugin(
@@ -87,7 +87,7 @@ jsonOp: 'thisIsNotAPatch'
}
func TestBothEmptyJson6902Transformer(t *testing.T) {
tc := plugins.NewEnvForTest(t).Set()
tc := plugins_test.NewEnvForTest(t).Set()
defer tc.Reset()
tc.BuildGoPlugin(
@@ -115,7 +115,7 @@ target:
}
func TestBothSpecifiedJson6902Transformer(t *testing.T) {
tc := plugins.NewEnvForTest(t).Set()
tc := plugins_test.NewEnvForTest(t).Set()
defer tc.Reset()
tc.BuildGoPlugin(
@@ -151,7 +151,7 @@ jsonOp: '[{"op": "add", "path": "/spec/template/spec/dnsPolicy", "value": "Clust
}
func TestPatchJson6902TransformerFromJsonFile(t *testing.T) {
tc := plugins.NewEnvForTest(t).Set()
tc := plugins_test.NewEnvForTest(t).Set()
defer tc.Reset()
tc.BuildGoPlugin(
@@ -201,7 +201,7 @@ spec:
}
func TestPatchJson6902TransformerFromYamlFile(t *testing.T) {
tc := plugins.NewEnvForTest(t).Set()
tc := plugins_test.NewEnvForTest(t).Set()
defer tc.Reset()
tc.BuildGoPlugin(
@@ -251,7 +251,7 @@ spec:
}
func TestPatchJson6902TransformerWithInline(t *testing.T) {
tc := plugins.NewEnvForTest(t).Set()
tc := plugins_test.NewEnvForTest(t).Set()
defer tc.Reset()
tc.BuildGoPlugin(