Fix krm exec function working dir

This commit is contained in:
Ahmed AbouZaid
2022-10-09 15:22:42 +02:00
parent 1b1e6ccab0
commit d29febecb7
3 changed files with 29 additions and 3 deletions

View File

@@ -78,3 +78,17 @@ func TestLoader(t *testing.T) {
}
}
}
func TestLoaderSetPluginConfigWorkingDir(t *testing.T) {
p := provider.NewDefaultDepProvider()
rmF := resmap.NewFactory(p.GetResourceFactory())
fsys := filesys.MakeFsInMemory()
c := types.EnabledPluginConfig(types.BploLoadFromFileSys)
pLdr := NewLoader(c, rmF, fsys)
pLdrCopy := *pLdr
pLdrCopy.DeepCopyPluginConfig()
pLdrCopy.SetPluginConfigWorkingDir("/tmp/dummy")
if pLdrCopy.Config().FnpLoadingOptions.WorkingDir != "/tmp/dummy" {
t.Fatal("plugin working dir is not set correctly")
}
}