@ -74,13 +74,13 @@ func TestPathEmptyPluginDir(t *testing.T) {
func TestPathSkipsEmptyPluginDirs ( t * testing . T ) {
func TestPathSkipsEmptyPluginDirs ( t * testing . T ) {
// A leading empty segment (e.g. ":/real/path") must be skipped so the plugin is
// A leading empty segment (e.g. ":/real/path") must be skipped so the plugin is
// installed into the first real directory rather than a relative path.
// installed into the first real directory rather than a relative path.
real := filepath . FromSlash ( "/helm/data/plugins" )
real Dir := filepath . FromSlash ( "/helm/data/plugins" )
multiPath := string ( filepath . ListSeparator ) + real
multiPath := string ( filepath . ListSeparator ) + real Dir
t . Setenv ( "HELM_PLUGINS" , multiPath )
t . Setenv ( "HELM_PLUGINS" , multiPath )
b := newBase ( "https://github.com/jkroepke/helm-secrets" )
b := newBase ( "https://github.com/jkroepke/helm-secrets" )
got := b . Path ( )
got := b . Path ( )
expected := filepath . Join ( real , "helm-secrets" )
expected := filepath . Join ( real Dir , "helm-secrets" )
if got != expected {
if got != expected {
t . Errorf ( "expected path %s, got %s" , expected , got )
t . Errorf ( "expected path %s, got %s" , expected , got )
}
}