Improve plugin home defaulting.

This commit is contained in:
jregan
2019-11-03 10:04:45 -08:00
parent ba925e833d
commit d08690a6aa
11 changed files with 263 additions and 67 deletions

View File

@@ -231,7 +231,7 @@ func definePatchDirStructure(th *kusttest_test.KustTestHarness) {
// Fails due to file load restrictor.
func TestIssue1251_Patches_ProdVsDev_Failure(t *testing.T) {
th := kusttest_test.NewKustTestHarnessAllowPlugins(t, "/app/prod")
th := kusttest_test.NewKustTestHarness(t, "/app/prod")
definePatchDirStructure(th)
th.WriteK("/app/prod", `

View File

@@ -65,7 +65,11 @@ metadata:
rf := resmap.NewFactory(resource.NewFactory(
kunstruct.NewKunstructuredFactoryImpl()), nil)
pl := pLdr.NewLoader(pgmconfig.EnabledPluginConfig(), rf)
c, err := pgmconfig.EnabledPluginConfig()
if err != nil {
t.Fatal(err)
}
pl := pLdr.NewLoader(c, rf)
tg, err := target.NewKustTarget(
ldr, valtest_test.MakeFakeValidator(), rf, transformer.NewFactoryImpl(), pl)
if err != nil {