test(plugin): cover install into first HELM_PLUGINS directory

Adds a TestPath case where HELM_PLUGINS contains multiple directories and verifies the plugin installs into the first one.

Signed-off-by: Yuhui Luo <92632263+lyh7c00@users.noreply.github.com>
pull/32569/head
Yuhui Luo 1 month ago committed by GitHub
parent c3c7c322b5
commit 96a9f07916
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,6 +14,8 @@ limitations under the License.
package installer package installer
import ( import (
"path/filepath"
"strings"
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
@ -33,6 +35,10 @@ func TestPath(t *testing.T) {
source: "https://github.com/jkroepke/helm-secrets", source: "https://github.com/jkroepke/helm-secrets",
helmPluginsDir: "/helm/data/plugins", helmPluginsDir: "/helm/data/plugins",
expectPath: "/helm/data/plugins/helm-secrets", expectPath: "/helm/data/plugins/helm-secrets",
}, {
source: "https://github.com/jkroepke/helm-secrets",
helmPluginsDir: strings.Join([]string{"/helm/data/plugins", "/helm/data/extra"}, string(filepath.ListSeparator)),
expectPath: "/helm/data/plugins/helm-secrets",
}, },
} }

Loading…
Cancel
Save