mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 17:34:21 +00:00
Improve config package names and reduce API exposure.
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"sigs.k8s.io/kustomize/api/filesys"
|
||||
"sigs.k8s.io/kustomize/api/pgmconfig"
|
||||
"sigs.k8s.io/kustomize/api/konfig"
|
||||
"sigs.k8s.io/kustomize/api/plugins/compiler"
|
||||
)
|
||||
|
||||
@@ -71,7 +71,7 @@ func (x *PluginTestEnv) makeCompiler() *compiler.Compiler {
|
||||
// $objRoot
|
||||
// so set things up accordingly.
|
||||
objRoot := filepath.Join(
|
||||
x.workDir, pgmconfig.ProgramName, pgmconfig.RelPluginHome)
|
||||
x.workDir, konfig.ProgramName, konfig.RelPluginHome)
|
||||
err := os.MkdirAll(objRoot, os.ModePerm)
|
||||
if err != nil {
|
||||
x.t.Error(err)
|
||||
@@ -100,14 +100,14 @@ func (x *PluginTestEnv) removeWorkDir() {
|
||||
}
|
||||
|
||||
func (x *PluginTestEnv) setEnv() {
|
||||
x.oldXdg, x.wasSet = os.LookupEnv(pgmconfig.XdgConfigHomeEnv)
|
||||
os.Setenv(pgmconfig.XdgConfigHomeEnv, x.workDir)
|
||||
x.oldXdg, x.wasSet = os.LookupEnv(konfig.XdgConfigHomeEnv)
|
||||
os.Setenv(konfig.XdgConfigHomeEnv, x.workDir)
|
||||
}
|
||||
|
||||
func (x *PluginTestEnv) resetEnv() {
|
||||
if x.wasSet {
|
||||
os.Setenv(pgmconfig.XdgConfigHomeEnv, x.oldXdg)
|
||||
os.Setenv(konfig.XdgConfigHomeEnv, x.oldXdg)
|
||||
} else {
|
||||
os.Unsetenv(pgmconfig.XdgConfigHomeEnv)
|
||||
os.Unsetenv(konfig.XdgConfigHomeEnv)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user