test(plugin): cover leading empty entry in HELM_PLUGINS

Adds a TestPath case where the list begins with the separator so the first non-empty directory is chosen.

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

@ -39,6 +39,10 @@ func TestPath(t *testing.T) {
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",
}, {
source: "https://github.com/jkroepke/helm-secrets",
helmPluginsDir: string(filepath.ListSeparator) + "/helm/data/plugins",
expectPath: "/helm/data/plugins/helm-secrets",
},
}

Loading…
Cancel
Save