Rename PluginsEnvVarPluginLoader to stop stutter

pull/6/head
tcharding 2017-08-31 16:36:17 +10:00
parent 86f1d74a69
commit 91eaa8a308
3 changed files with 5 additions and 5 deletions

View File

@ -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(),

View File

@ -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")
}

View File

@ -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 {