MCPcopy
hub / github.com/helm/helm / TestLoadDirGetter

Function TestLoadDirGetter

internal/plugin/loader_test.go:140–166  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

138}
139
140func TestLoadDirGetter(t *testing.T) {
141 dirname := "testdata/plugdir/good/getter"
142
143 expect := Metadata{
144 Name: "getter",
145 Version: "1.2.3",
146 Type: "getter/v1",
147 APIVersion: "v1",
148 Runtime: "subprocess",
149 Config: &schema.ConfigGetterV1{
150 Protocols: []string{"myprotocol", "myprotocols"},
151 },
152 RuntimeConfig: &RuntimeConfigSubprocess{
153 ProtocolCommands: []SubprocessProtocolCommand{
154 {
155 Protocols: []string{"myprotocol", "myprotocols"},
156 PlatformCommand: []PlatformCommand{{Command: "echo getter"}},
157 },
158 },
159 },
160 }
161
162 plug, err := LoadDir(dirname)
163 require.NoError(t, err)
164 assert.Equal(t, dirname, plug.Dir())
165 assert.Equal(t, expect, plug.Metadata())
166}
167
168func TestPostRenderer(t *testing.T) {
169 dirname := "testdata/plugdir/good/postrenderer-v1"

Callers

nothing calls this directly

Calls 3

LoadDirFunction · 0.70
DirMethod · 0.65
MetadataMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…