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

@@ -40,8 +40,11 @@ func NewKustTestHarness(t *testing.T, path string) *KustTestHarness {
}
func NewKustTestHarnessAllowPlugins(t *testing.T, path string) *KustTestHarness {
return NewKustTestHarnessFull(
t, path, fLdr.RestrictionRootOnly, pgmconfig.EnabledPluginConfig())
c, err := pgmconfig.EnabledPluginConfig()
if err != nil {
t.Fatal(err)
}
return NewKustTestHarnessFull(t, path, fLdr.RestrictionRootOnly, c)
}
func NewKustTestHarnessNoLoadRestrictor(t *testing.T, path string) *KustTestHarness {
@@ -100,7 +103,10 @@ func (th *KustTestHarness) FromMap(m map[string]interface{}) *resource.Resource
return th.rf.RF().FromMap(m)
}
func (th *KustTestHarness) FromMapAndOption(m map[string]interface{}, args *types.GeneratorArgs, option *types.GeneratorOptions) *resource.Resource {
func (th *KustTestHarness) FromMapAndOption(
m map[string]interface{},
args *types.GeneratorArgs,
option *types.GeneratorOptions) *resource.Resource {
return th.rf.RF().FromMapAndOption(m, args, option)
}