Commit 91eaa8a3 authored by tcharding's avatar tcharding

Rename PluginsEnvVarPluginLoader to stop stutter

parent 86f1d74a
......@@ -180,7 +180,7 @@ func (f *ring2Factory) NewUnstructuredBuilder(allowRemoteCalls bool) (*resource.
// system directory structure spec for the given platform.
func (f *ring2Factory) PluginLoader() plugins.PluginLoader {
if len(os.Getenv("KUBECTL_PLUGINS_PATH")) > 0 {
return plugins.PluginsEnvVarPluginLoader()
return plugins.KubectlPluginsPathPluginLoader()
}
return plugins.TolerantMultiPluginLoader{
plugins.XDGDataPluginLoader(),
......
......@@ -137,9 +137,9 @@ func PathFromEnvVarPluginLoader(envVarName string, subdirs ...string) PluginLoad
return loader
}
// PluginsEnvVarPluginLoader returns a PluginLoader that loads plugins from one or more
// KubectlPluginsPathPluginLoader returns a PluginLoader that loads plugins from one or more
// directories specified by the KUBECTL_PLUGINS_PATH env var.
func PluginsEnvVarPluginLoader() PluginLoader {
func KubectlPluginsPathPluginLoader() PluginLoader {
return PathFromEnvVarPluginLoader("KUBECTL_PLUGINS_PATH")
}
......
......@@ -109,7 +109,7 @@ func TestUnexistentDirectoryPluginLoader(t *testing.T) {
}
}
func TestPluginsEnvVarPluginLoader(t *testing.T) {
func TestKubectlPluginsPathPluginLoader(t *testing.T) {
tmp, err := setupValidPlugins(1, 0)
if err != nil {
t.Fatalf("unexpected error: %v", err)
......@@ -120,7 +120,7 @@ func TestPluginsEnvVarPluginLoader(t *testing.T) {
os.Setenv(env, tmp)
defer os.Unsetenv(env)
loader := PluginsEnvVarPluginLoader()
loader := KubectlPluginsPathPluginLoader()
plugins, err := loader.Load()
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment