MCPcopy
hub / github.com/helm/helm / TestPath

Function TestPath

internal/plugin/installer/base_test.go:20–46  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

18)
19
20func TestPath(t *testing.T) {
21 tests := []struct {
22 source string
23 helmPluginsDir string
24 expectPath string
25 }{
26 {
27 source: "",
28 helmPluginsDir: "/helm/data/plugins",
29 expectPath: "",
30 }, {
31 source: "https://github.com/jkroepke/helm-secrets",
32 helmPluginsDir: "/helm/data/plugins",
33 expectPath: "/helm/data/plugins/helm-secrets",
34 },
35 }
36
37 for _, tt := range tests {
38
39 t.Setenv("HELM_PLUGINS", tt.helmPluginsDir)
40 baseIns := newBase(tt.source)
41 baseInsPath := baseIns.Path()
42 if baseInsPath != tt.expectPath {
43 t.Errorf("expected name %s, got %s", tt.expectPath, baseInsPath)
44 }
45 }
46}

Callers

nothing calls this directly

Calls 2

newBaseFunction · 0.85
PathMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…